• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dcdpr / jp / 26625401120 / 1
66%
main: 66%

Build:
DEFAULT BRANCH: main
Ran 29 May 2026 08:01AM UTC
Files 382
Run time 10s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 May 2026 07:54AM UTC coverage: 66.435% (+0.03%) from 66.408%
26625401120.1

push

github

web-flow
fix(printer): Strip ANSI sequences split across writes (#684)

`strip_ansi_escapes::strip_str` was called once per task, so a CSI
sequence emitted across multiple `write_str` calls (which is exactly
what `write!`/`writeln!` and crossterm do internally) was never seen as
a complete sequence. The escape introducer got dropped while the
parameter bytes survived, producing cruft like `38;5;11m1mgit_diff` in
non-pretty output modes.

Introduce `AnsiStripper<W>` in a new `ansi` module: a `Write` wrapper
that drives a `vte::Parser` over every byte written to it. Because the
parser state lives on the struct, escape sequences split across any
number of calls are correctly recognized and discarded. Only printable
characters and newlines are forwarded to the inner writer.

The `Worker` in `printer.rs` no longer holds a bare `O`/`E` writer pair.
Instead, each stream is wrapped in a new `Sink<W>` enum that is either
`Raw` (pretty formats, pass bytes through) or `Strip` (all other
formats, route through `AnsiStripper`). This means each stream owns its
own persistent parser state, so an open sequence on `out` can never
consume bytes destined for `err`.

Fixes #683

---------

Signed-off-by: Jean Mertz <git@jeanmertz.com>

31988 of 48149 relevant lines covered (66.44%)

253.95 hits per line

Source Files on job 26625401120.1
  • Tree
  • List 382
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 26625401120
  • e2db8c90 on github
  • Prev Job for on main (#26625300837.1)
  • Next Job for on main (#26627902919.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc