Another example of post corruption specific to the "rich text editor":
Minimal reproduction:
-
Add the following content to the Arduino IDE 2.x editor:
foo [i] bar- ⓘ The fault is specific to content copied from the Arduino IDE 2.x editor due to the way it populates the clipboard with formatted (
text/htmltype) data, instead of only plaintext (text/plainkind) data as you would obtain by copying from other applications (including Arduino IDE 1.x). - ⓘ The leading spaces on the line that contains content resembling BBCode markup are required, as these act as code block markup (alternative syntax to fenced code block markup.
- ⓘ The
fooandbarlines are not required to reproduce the fault, but were added to make the nature of the fault more clear.
- ⓘ The fault is specific to content copied from the Arduino IDE 2.x editor due to the way it populates the clipboard with formatted (
-
Select the content from the Arduino IDE editor.
-
Do a standard copy (not using the "Copy for Forum (Markdown)" feature) of the content from the Arduino IDE editor.
-
Open a post composer.
-
Put the post composer in the "rich text editor" mode.
-
Paste the copied content into the composer.
ⓘ The corruption will not be visible in the composer. -
Publish the post.
The post will have the following corrupted form:
foo
\[i\]
bar
The problem does not occur if the user posts the code correctly, by any of the available methods (the "Copy for Forum (Markdown)" feature, proactively activating a code block, retroactively applying code formatting to the selection. So it is more a matter of user error since we expect corruption of code that is not posted correctly. However, this is distinctive in a couple of ways:
- The corruption is not visible in the post preview
- The corrupted code is rendered in a code block