These Forums have a problem with the code converting pasted HTML text to HTML in the comment

There is a problem with the code converting pasted text to HTML. It removes spaces following some tags causing the text to be spliced together. I type the comments into the IDE using markdown and copy the generated HTML to the clipboard for pasting into the comment box.

This is the only way I found of preserving code indentations and easy reference inclusion.

Even pasting HTML is not safe. I pasted the following into a comment, markdown first:

That is because it is [Kotlin] not Java.

Java equivalent but without the lazy initialization would be:

```java
class ProjectComponent {
    final static EditorWindowKey INITIAL_INDEX_KEY = EditorWindowKey();
}
```

The resulting HTML is:

That is because it is <a href="http://kotlinlang.org">Kotlin</a> not Java.<br /><br />
Java equivalent but without the lazy initialization would be:<br /><br />
<pre><code class="java">class ProjectComponent {
    final static EditorWindowKey INITIAL_INDEX_KEY = EditorWindowKey();
}
</code></pre>

What was put into the comment was (note the lack of space after the link):

<p style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">
    That is because it is<span class="Apple-converted-space"> </span><a href="http://kotlinlang.org/">Kotlin</a>not
    Java.</p><p
        style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">
     </p>
The same thing happens with **bold** *italic* or `inline code` text.

The same thing happens with bolditalicor inline codetext.

Pasted HTML:

The same thing happens with <strong>bold</strong> <em>italic</em> or <code>inline code</code> text.<br /><br />

What the comment gets (note the missing spaces after the inline tags):

<span
    style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-size: medium; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; display: inline !important; float: none;"
>The same thing happens with<span
    class="Apple-converted-space"
> </span></span>
<strong
    style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-style: normal; font-variant-caps: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"
>bold</strong>
<em style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">italic</em>
<span
    style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-size: medium; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; display: inline !important; float: none;"
>or<span
    class="Apple-converted-space"
> </span></span>
<code
    style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"
>inline
  code</code><span
    style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: -webkit-standard; font-size: medium; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; display: inline !important; float: none;"
>text.</span>

Support for markdown in comments would be ideal, short of that at least pasting HTML should not splice words together.


0

Please sign in to leave a comment.