You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In C, C++, Objective-C, and Objective-C++, the official parser specification requires backslash-newline to be removed from the input stream before comments are handled, which means it can extend comments. The most important case of this is
// this line is a comment \this line is also part of the commentthislineisoutsidethecomment
where both the first and second lines, but not the third, should be highlighted as a comment. Other cases include
WFM in casual testing (see https://regex101.com/r/Q1xuiv/2 ). I didn't bother with trigraphs, because I didn't see a good way to do it without negative lookbehind, which JS regexen don't have. But trigraphs come up far less often.
In C, C++, Objective-C, and Objective-C++, the official parser specification requires backslash-newline to be removed from the input stream before comments are handled, which means it can extend comments. The most important case of this is
where both the first and second lines, but not the third, should be highlighted as a comment. Other cases include
and
https://prismjs.com/test.html currently gets all of these wrong. I would forgive you for not bothering to handle the second and third cases.
And of course -newline can also be spelled ??/-newline, but again, I'd forgive you for not bothering with that one.
The text was updated successfully, but these errors were encountered: