Open pkaminski opened 8 months ago
Nothing to do with strings, this is broken from use
because we're expecting that has special meaning and must be terminated by a ;
:
Interesting — is the PHP code's syntax incorrect then? (I know nothing about PHP, this was reported by a user.)
Oh, I see — the use
token is dual-use (hah!) in PHP, and HighlightJS is assuming the import/aliasing meaning, right?
Describe the issue It looks like a semicolon inside a string is parsed as terminating the statement, at least sometimes.
Which language seems to have the issue?
php
Are you using
highlight
orhighlightAuto
?highlight
Sample Code to Reproduce Fiddle here: https://jsfiddle.net/c3sLm2ga/. See how the highlighting gets messed up halfway through the string in the
throw
statement. Oddly, double-quoted strings are also affected but in a slightly different way.Expected behavior