-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support ES6 syntax #111
Comments
I put together a CodePen that shows the current level of support for ES6 features in Prism: It actually looks like the arrow function syntax is now supported (wahoo!), but there are just a few missing pieces:
|
For point 1 & 2 see #597. |
Fat arrow and spread operators are highlighted, indeed, but not as whole tokens. |
Just added support for template strings (04f72b1). I updated the examples with a section illustrating those ES6 features: I also updated the known failures: |
You're all so awesome! I think we're done here, right? We can close this issue? (Unless you wanted to keep it open to address the edge cases you described, @Golmote?) |
No, I think we can close it for now. We'll think about those spread and fat arrow operators later, since they are currently highlighted, though not as semantically as expected. |
Any work on that? I understand these operators are already highlighted, but a drawback is for people who use fonts with ligatures. Since Prism renders those operators in two separate |
Among other things, ES6 added arrow function syntax.
Currently, Prism highlights the arrow as if it was the inequality operator.
The text was updated successfully, but these errors were encountered: