Automattic / syntaxhighlighter

WordPress plugin that makes it easy to post syntax-highlighted code snippets.
https://alex.blog/wordpress-plugins/syntaxhighlighter/
239 stars 78 forks source link

2-character single-line does not display #247

Open cena opened 2 years ago

cena commented 2 years ago

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:

SCR-20220729-fy2

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/

StefMattana commented 2 years ago

I looped @merkushi, and this is what's been shared so far:

merkushin commented 2 years ago

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):

CleanShot 2022-07-29 at 17 45 00@2x
StefMattana commented 2 years ago

@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.