Skip to content

fix: resolve issue #4 - #5

Draft
PavanaSakethaRam wants to merge 1 commit into
developfrom
fix/issue-4-20261019180629-72b44161
Draft

PavanaSakethaRam wants to merge 1 commit into
developfrom
fix/issue-4-20261019180629-72b44161

Conversation

@PavanaSakethaRam

Copy link
Copy Markdown
Collaborator

The root cause was the regex pattern in strip_ansi at src/utils.rs:50 which only matched digits and semicolons ([0-9;]*) inside CSI sequences. Colon-separated SGR parameters (e.g., \x1b[38:2:255:0:0m for truecolor) were not recognized. The fix expands the character class to [0-9;:]* to also match colons. All 34 utils tests pass, including the new regression test and all existing strip_ansi tests.

Refs #4

Reproduction and validation

Regression: utils::tests::bugfix_issue_4_test_strip_ansi_colon_sgr. Confirmed failing on the baseline plus the new test (observed assertion: assertion left == right failed), and passing with the implementation change.

  • cargo test --bin rtk --locked --offline utils::tests::bugfix_issue_4_test_strip_ansi_colon_sgr -- --exact --nocapture --test-threads=1: passed
  • cargo fmt --all -- --check: passed
  • cargo clippy --workspace --all-targets --locked --offline: passed
  • cargo test --workspace --locked --offline: passed
  • cargo clippy --no-default-features --all-targets --locked --offline: passed
  • cargo test --no-default-features --locked --offline: passed
  • cargo doc --no-deps --locked --offline: passed

Verified tree: b9da47ad1057c6e609328ba37598a31fb89bf72c.

Generated by the RTK Bugfix Agent. Local Linux verification is recorded; upstream CI, maintainer review, and any required CLA action remain separate.

Signed-off-by: Pavan Saketh Ram <pavan.sakethram@gmail.com>
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