syntaxhighlighter
syntaxhighlighter copied to clipboard
2-character single-line does not display
Regardless of language/brush, entering a single line consisting of a 2-character string does not display on the frontend or in Preview.
The following do display correctly:
- Entries of 1 character and 3 characters
- 2/+ lines consisting of 2-character strings:
See also: https://a8c.slack.com/archives/C6GGX896G/p1659100898753839?thread_ts=1659085924.820659&cid=C6GGX896G
Reported in https://wordpress.org/support/topic/two-letters-text-doesnt-show/
I looped @merkushi, and this is what's been shared so far:
- To fix it we'd need to edit the script, which looks not really doable.
- As a workaround, we could add a comment to the code to increase the number of symbols in the excerpt.
- The simplest solution, especially for plain text, is to use Code block.
Just want to add, the problem is inside shCore.js which is part of syntaxhighlighter3.
The code of this script is obfuscated. I attach a screenshot of the method that removes content (in the last string, after auto-formatting):
@merkushin the user in the forum thread explained that they need this to recreate a tutorial page for a cloud server. The tutorial separately shows code/command in order and displays those two letters as one of the commands.
Not sure if it's useful but I thought it was worth sharing here.