-
Notifications
You must be signed in to change notification settings - Fork 26
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
Javascript new ES6 identifiers are not handled as such #24
Comments
@jr-grenoble What's your use case of sunlight highlighter? If you're highlighting code from Node.js, you should probably check https://github.com/lwchkg/sunlight-x for a version that will actually be maintained. BTW, why not also to file a issue in https://github.com/lwchkg/sunlight-x/issues? I'd both languages and webpack in my todos, but if you file them I'd give these more priority. |
@jr-grenoble I see. I'll add an issue at docstrap to see if they're interested. Anyway, I don't see any reason to close the issue here though. |
You are correct,, I'm reopening it here. Thanks ! |
There are 2 issues related to ES6 identifiers:
Note that you can check that πκ is a valid ES6 identifier. Mathias Bynens from Google has created a script that generates the proper regex for ES6 (and ES5) identifiers.
However, the Sunlight javascript rules for syntax highlighting do not handle such identifiers properly and treat them as punctuation, e.g.
d.πκ ( { days: 7 } );
will display with π and κ highlighted as sunlight-punctuation.It is not a font issue, as Consolas is capable of displaying this letter.
Note that there are other UTF-8 characters that exhibit this second issue, this is only an example.
The text was updated successfully, but these errors were encountered: