-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
(rust) quotes around a char emoji are not colored properly #3933
Comments
I'm guessing |
Would using |
I talked a bit too fast, the pattern above does not work either (I think ✨ is encoded using only one codepoint, the problem seems to be for characters encoded with 2 codepoints).
I really am not a regex expert, but I found the following matches for emojis / unicode characters, this might be of some help: |
Want to see if my fix works? |
Describe the issue
In rust, single quotes around an emoji are not colored properly.
However, autodetect (on csharp) successfully colors it.
Which language seems to have the issue?
Rust
Are you using
highlight
orhighlightAuto
?highlight
Sample Code to Reproduce
https://jsfiddle.net/cawyx173/
rust, coloring doesn't work

autodetect (csharp), works

Expected behavior
When using rust highlighting, single quotes around an emoji should have the same color as single quotes around any other character.
Additional context
Syntax highlighting works properly using double quotes around emojis.
Problem seen in rust book.
The text was updated successfully, but these errors were encountered: