Skip to content

char boundary panic on 0.11.4, fixed on master #161

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

Closed
lvaroqui opened this issue Nov 25, 2024 · 1 comment
Closed

char boundary panic on 0.11.4, fixed on master #161

lvaroqui opened this issue Nov 25, 2024 · 1 comment

Comments

@lvaroqui
Copy link

lvaroqui commented Nov 25, 2024

Hello,

I'm using typst-languagetool, which relies on annotate-snippets, and faced a panic on bad char slicing of UTF-8 string in annotate-snippets. Here's what the error looks like (I redacted string for privacy and clarity):

thread 'main' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/annotate-snippets-0.11.4/src/renderer/display_list.rs:369:29:
byte index 132 is not a char boundary; it is inside 'à' (bytes 131..133) of `<...> à chaq`

After a little digging, I found out that the issue was resolved back in June by this commit.

Is there a plan to release a new version of this crate to make this bug fix available?

Thanks!

@Muscraft
Copy link
Member

Muscraft commented Dec 9, 2024

Whoops, sorry, I missed releasing that.

I just released 0.11.5, which includes that fix.

@Muscraft Muscraft closed this as completed Dec 9, 2024
woodruffw added a commit to woodruffw/zizmor that referenced this issue Dec 9, 2024
This bumps to the latest patch version, which
is noted to fix a panic in string slicing.

Fixes #263

See: rust-lang/annotate-snippets-rs#161

Signed-off-by: William Woodruff <william@yossarian.net>
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

2 participants