Skip to content
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

A bug with a cat and a bat and javascript and fe0f (unicode variation selector) #450

Open
th1000s opened this issue Oct 9, 2022 · 0 comments

Comments

@th1000s
Copy link
Contributor

th1000s commented Oct 9, 2022

Highlighting the string "`😸️" (which is an apostrophe followed by a cat emoji with a variant selector to indicate color) using javascript syntax works fine when using default syntect settings.

However when using bat assets (bat::assets::HighlightingAssets::from_binary()) the variant selector is split off: "😸\u{fe0f}" vs "😸", "\u{fe0f}". Further downstream this confuses delta, see dandavison/delta#1172. Building or clearing the bat cache has no influence on that.

Since my understanding is that no syntax definition should be able change these low level unicode bits I am opening an issue here and not with bat.

See the example HighlightLines::highlight_line() call in batcatbug.rs or to reproduce clone https://github.com/th1000s/bat and run cargo run --example batcatbug with branch highlighter_bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant