Create a new text page with syntaxhighlighter enabled
Paste the following text using CTRL + Shift + V:
```lang:cs;;private void Function()
{
int number = 10; // Single-line comment
string str = "Hello";
}```
Observe the single-line comment highlight carries over to the next line and in fact never ends.
The same thing happens when you insert <br> tag using Shift + Enter
It looks like highlight.js cannot deal with <br> tags, and expects \n character to end a line.
I was able to fix this locally with the following code_replace function in filter.php:
Why would I use CTRL + Shift + V to insert text? Because if I just use CTRL + V, depending on where I copied the text from it will include additional markup like extra <pre> tags, colors, etc. and I just want to insert the text.
Observe the single-line comment highlight carries over to the next line and in fact never ends. The same thing happens when you insert
<br>
tag using Shift + Enter It looks like highlight.js cannot deal with<br>
tags, and expects \n character to end a line.I was able to fix this locally with the following code_replace function in filter.php:
Here is a screenshot of the issue:
Here is the text in Atto editor:
Here is the generated markup in Atto editor:
Why would I use CTRL + Shift + V to insert text? Because if I just use CTRL + V, depending on where I copied the text from it will include additional markup like extra
<pre>
tags, colors, etc. and I just want to insert the text.