Skip to content

Fix BOM rendering and line number styles#2125

Open
chid wants to merge 1 commit intodandavison:mainfrom
chid:fix/bom-line-numbers
Open

Fix BOM rendering and line number styles#2125
chid wants to merge 1 commit intodandavison:mainfrom
chid:fix/bom-line-numbers

Conversation

@chid
Copy link

@chid chid commented Mar 20, 2026

Fixes #2123 and #1837.

Summary

  • Strip UTF-8 BOM characters during line ingestion so they do not affect diff classification, syntax highlighting, or width calculations.
  • Resolve built-in line-numbers after theme features so theme-provided line-numbers-* styles are preserved when --line-numbers is enabled.
  • Add regression coverage for both behaviors.

Verification

  • cargo test

@chid chid marked this pull request as ready for review March 20, 2026 15:17
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

Successfully merging this pull request may close these issues.

🐛 UTF-8 BOM causes rendering issues

2 participants