ruff/crates/ruff_annotate_snippets/src/renderer
Andrew Gallant a45f4de683 ruff_annotate_snippets: fix false positive line trimming
This fix was sent upstream and the PR description includes more details:
https://github.com/rust-lang/annotate-snippets-rs/pull/170

Without this fix, there was an errant snapshot diff that looked like
this:

  |
1 |   version = "0.1.0"
2 |   # Ensure that the spans from toml handle utf-8 correctly
3 |   authors = [
  |  ___________^
4 | |     { name = "Z͑ͫ̓ͪ̂ͫ̽͏̴̙...A̴̵̜̰͔ͫ͗͢L̠ͨͧͩ͘G̴̻͈͍̑͗̎̅͛́Ǫ̵̹̻̝̳͂̌̌͘", email = 1 }
5 | | ]
  | |_^ RUF200
  |

That ellipsis should _not_ be inserted since the line is not actually
truncated. The handling of line length (in bytes versus actual rendered
length) wasn't quite being handled correctly in all cases.

With this fix, there's (correctly) no snapshot diff.
2025-01-15 13:37:52 -05:00
..
display_list.rs ruff_annotate_snippets: fix false positive line trimming 2025-01-15 13:37:52 -05:00
margin.rs ruff_annotate_snippets: fix false positive line trimming 2025-01-15 13:37:52 -05:00
mod.rs crates: vendor annotate-snippets crate 2025-01-15 13:37:52 -05:00
styled_buffer.rs crates: vendor annotate-snippets crate 2025-01-15 13:37:52 -05:00
stylesheet.rs crates: vendor annotate-snippets crate 2025-01-15 13:37:52 -05:00