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

dcdpr / jp / 27491626702
67%

Build:
DEFAULT BRANCH: main
Ran 14 Jun 2026 07:16AM UTC
Jobs 1
Files 409
Run time 1min
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

14 Jun 2026 07:14AM UTC coverage: 66.492% (-0.07%) from 66.565%
27491626702

push

github

web-flow
refactor(md): ANSI tokenizer, fix compound-escape wrapping (#744)

Several related cleanups and two bug fixes in `jp_md`.

**Unified ANSI tokenizer**

`ansi::segments()` replaces three independent hand-rolled escape
scanners
in `ansi.rs`, `table.rs` (both `wrap_to_visual_width` and
`hard_break_into`). Every escape-aware routine now shares a single
termination rule so they cannot drift against each other.

**`RenderOptions` struct**

`format_terminal`, `TerminalFormatter::new`, `format_table`, and the
internal `extract_table`/`render_cell_content` helpers previously
accepted six to eight individual parameters. They all now receive a
`RenderOptions<'_>` value. Cell rendering derives a child options value
(`width: 0, indent: 0`) while inheriting theme, backgrounds, and HR
style, which makes the "cells disable wrapping" invariant explicit.

**`ListState` struct**

`State::InList` carried six inline fields. They are collapsed into a
`ListState` value so the list handlers (`handle_in_list`,
`flush_list_segment`, `classify_list_line`, etc.) take one argument
instead of six. A new `render_list_segment` helper is now shared between
the streaming flush path and the new end-of-region flush path, ensuring
both agree on stripping and renumbering.

**`Fixups` replaces `FixupChain`**

`FixupChain<I>` wrapped an iterator and was awkward to compose.
`Fixups` is an iterator-agnostic set with a single `apply(event)`
method, used as `iter.filter_map(|e| fixups.apply(e))`.
`Fixups::llm_quirks()` is a convenience constructor for the standard
LLM-output fixup set.

**`HtmlTerminator` enum**

`HtmlBlockRule::terminator()` now returns a typed `HtmlTerminator`
(`Tag(&str)` or `BlankLine`) instead of a raw string sentinel. The
handler matches on the variant directly.

**Bug fix: compound escape sequences lost on wrap**

When a line wraps, `TerminalWriter` records a restore escape that
concatenates one escape per active attribute. The code passed that
compound string to `AnsiSta... (continued)

289 of 302 new or added lines in 10 files covered. (95.7%)

9 existing lines in 3 files now uncovered.

34468 of 51838 relevant lines covered (66.49%)

225.41 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
92.44
1.63% crates/jp_md/src/table.rs
3
96.86
0.29% crates/jp_cli/src/render/chat.rs
3
96.07
0.74% crates/jp_md/src/buffer.rs
2
94.74
0.0% crates/jp_md/src/buffer/state.rs
1
72.18
-1.52% crates/jp_md/src/render.rs

Coverage Regressions

Lines Coverage ∆ File
7
81.86
-3.1% crates/contrib/schematic_macros/src/common/field.rs
1
90.74
-0.93% crates/contrib/schematic_macros/src/common/container.rs
1
93.37
0.04% crates/jp_md/src/writer.rs
Jobs
ID Job ID Ran Files Coverage
1 27491626702.1 14 Jun 2026 07:16AM UTC 409
66.49
GitHub Action Run
Source Files on build 27491626702
  • Tree
  • List 409
  • Changed 12
  • Source Changed 10
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27491626702
  • f4701705 on github
  • Prev Build on main (#26894888199)
  • Next Build on main (#27491629811)
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