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 think that problem is the logic of converting strings to buffers.
Sometimes a Unicode "character" is made up of multiple Unicode scalar values, like the emoji1 in the above example or the ”é“ character, but in Rust, char can only represent one unicode scalar.
The conversion logic here turns the second byte into a replacement_character, which causes the problem. I'm not sure why there is a need to make this conversion, but I think the unicode-segmentation might be helpful in solving this problem.
Environment information
What happened?
When using
biome format
via stdin, some emojis seem to break. This does not affect all emojis, and it does not affectbiome format --write
.(The different emoji sizes is a Wezterm-font-thing, I checked that the issue persists when opening the file in TextEdit.)
Expected result
Emojis not breaking
Code of Conduct
The text was updated successfully, but these errors were encountered: