You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
After looking at the char implementation, the following are also valid but not matched by the expression above:
'\u{10ffff}'
'\u{FFFD}'
🥰 (actually, most unicode emojis seem to fail)
'𝕊'
I really am not a regex expert, but I found the following matches for emojis / unicode characters, this might be of some help:
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: