-
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 for ligatures in JavaScript? #1133
Comments
Hi, what language are you highlighting? |
JavaScript. |
Thanks for reporting. This should be fixed now. |
@Golmote Could you publish a new version on npm? |
Well, it is fixed in JavaScript but not C#. The title |
Solve the issue of [C# breaking ligature fonts with the `=>` operator](#1133 (comment)). `=>` is now an operator. There are also some other changes. 1. `?` and `:` are now all included by `punctuation`. Because `:` cannot be included in `operator` (because it is also used for inheritance) the `?` shouldn't be an `operator` either. 2. `??` and `?.` were added to `punctuation`. They weren't explicitly supported before. 3. An operator-test was added.
Solve the issue of [C# breaking ligature fonts with the `=>` operator](PrismJS#1133 (comment)). `=>` is now an operator. There are also some other changes. 1. `?` and `:` are now all included by `punctuation`. Because `:` cannot be included in `operator` (because it is also used for inheritance) the `?` shouldn't be an `operator` either. 2. `??` and `?.` were added to `punctuation`. They weren't explicitly supported before. 3. An operator-test was added.
@Golmote Same applies to Rust, |
@dsvensson Does this also apply for other Rust operators? Edit: Nvm. I tested |
@RunDevelopment Nice... the documentation actually has a complete table of all operators, https://doc.rust-lang.org/book/appendix-02-operators.html |
@VFDan Point is: ligatures breaking is usually just a sign that Prism tokenization isn't correct. |
Hi, I see that if I write
=>
it gets converted in:But this breaks the ligature of the font I'm using (Fira Code).
Could it be possible to group together tokens of the same type to allow ligatures?
Ideally the markup should be:
The text was updated successfully, but these errors were encountered: