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

humanspeak / svelte-markdown / 25363806545
93%
main: 81%

Build:
Build:
LAST BUILD BRANCH: fix/katex-delimiter-boundaries
DEFAULT BRANCH: main
Ran 05 May 2026 07:38AM UTC
Jobs 1
Files 126
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

05 May 2026 07:36AM UTC coverage: 93.424%. First build
25363806545

push

github

web-flow
fix(extensions): broaden KaTeX delimiter and boundary handling (#282)

* fix(extensions): broaden KaTeX delimiter and boundary handling

Two regex tweaks in `src/lib/extensions/katex/markedKatex.ts` that
fix real-world LLM output we were silently dropping:

1. Block rules accept single-line delimiters in addition to own-line
   - `^\\\[\s*([\s\S]+?)\s*\\\](?:\n|$)` — was `[ \t]*\n…`
   - `^\$\$\s*([\s\S]+?)\s*\$\$(?:\n|$)` — was `[ \t]*\n…`
   LLMs (Claude, ChatGPT, etc.) overwhelmingly emit `$$x = \frac{...}$$`
   on a single line. The own-line-only rule meant those formulas
   survived as paragraph text because the inline tokenizer also
   rejects `$$` openers via `(?!\$)`. The relaxed `\s*` keeps the
   own-line form working too.

2. Inline `$...$` boundary lookahead now accepts `)`, `]`, `}`
   - `(?=[\s?!.,:)\]}?!。,:]|$)` — was `(?=[\s?!.,:?!。,:]|$)`
   The original boundary class (ported from upstream
   marked-katex-extension) didn't include closing brackets, so
   `($e$, $i$, $\pi$, $1$, $0$)` lost the trailing `$0$` because
   it was followed by `)`. Currency strings like `$5,000 across $42`
   still don't match because digits after the closing `$` aren't
   in any boundary class.

Adds five new unit tests covering single-line `$$x$$`, single-line
`\[x\]`, and the `)` / `]` / `}` boundary cases. Existing currency
and AMS tests still pass.

Adds `/test/katex-issue` route as a regression playground — the
exact dataverse transcript that exposed both bugs is rendered top
to bottom, plus 10 isolated fragments with `data-testid` hooks for
direct Playwright assertions.

Verified: 778/778 unit tests, 95/95 KaTeX e2e (5 browsers), live
Playwright walk-through of `/test/katex-issue` confirms all 10
fragments render correctly while currency strings stay text.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(extensions): align KaTeX delimiter table with new behavior

CodeRabbit pass on PR #282 caught two real follow-ups from ... (continued)

476 of 545 branches covered (87.34%)

Branch coverage included in aggregate %.

3 of 3 new or added lines in 1 file covered. (100.0%)

973 of 1006 relevant lines covered (96.72%)

5507.15 hits per line

Jobs
ID Job ID Ran Files Coverage
1 node-22 - 25363806545.1 05 May 2026 07:38AM UTC 126
93.42
GitHub Action Run
Source Files on build 25363806545
  • Tree
  • List 126
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25363806545
  • 4fdc52d9 on github
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