Skip to content

fix: preserve ANSI escapes while stripping manpage overstrike#3762

Open
sjh9714 wants to merge 2 commits into
sharkdp:masterfrom
sjh9714:fix-manpage-ansi-overstrike
Open

fix: preserve ANSI escapes while stripping manpage overstrike#3762
sjh9714 wants to merge 2 commits into
sharkdp:masterfrom
sjh9714:fix-manpage-ansi-overstrike

Conversation

@sjh9714
Copy link
Copy Markdown

@sjh9714 sjh9714 commented May 20, 2026

Summary

  • Preserve ANSI escape sequences that appear between an overstruck character and the following backspace.
  • Prevent manpage overstrike stripping from truncating SGR resets like \x1b[22m into broken sequences such as \x1b[22v.
  • Add unit and integration regression coverage for the manpage path.

Testing

  • PATH="$HOME/.cargo/bin:$PATH" cargo test test_strip_overstrike_preserves_ansi_before_backspace
  • PATH="$HOME/.cargo/bin:$PATH" cargo test --test integration_tests strip_overstrike_for_manpage_syntax_keeps_ansi_escapes_intact
  • PATH="$HOME/.cargo/bin:$PATH" cargo test --locked strip_overstrike
  • PATH="$HOME/.cargo/bin:$PATH" cargo fmt --check
  • PATH="$HOME/.cargo/bin:$PATH" cargo test --locked

Refs #3724

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.

1 participant