New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(go) Misunderstands Backslash Character Literals #1411
Comments
Can you confirm this is still and issue and if so perhaps provider a jsfiddle example? Quick template: |
Still looks broken to me: https://jsfiddle.net/vchkrL3a/ |
We don't seem to think that is valid. The grammar right now says you can't end a string like that... I think it's trying to poorly protect against escaping, but I"m not sure. |
That doesn't seem right to me, seems like we should probably use APOS_STRING_MODE there?
|
@wyattallen Any chance you could whip up a PR? Looks like |
In Go, when invoking the escape sequence for backslash in a character literal, HLJS gets stuck incorrectly interpreting the following lines as part of a string. Observe the following simple go program.
When highlighted with HLJS 9.5.0, the entire file following the
'\\'
is highlighted as a string. It doesn't have this issue with the string literal ("\\"
).The text was updated successfully, but these errors were encountered: