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

humanspeak / svelte-markdown
93%
main: 81%

Build:
Build:
LAST BUILD BRANCH: fix/katex-delimiter-boundaries
DEFAULT BRANCH: main
Repo Added 03 Jan 2025 07:23PM UTC
Files 126
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

LAST BUILD ON BRANCH fix/katex-delimiter-boundaries
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • 0.7.-
  • bug-html-inline
  • feature-8.x
  • feature-ci-cd
  • fix/katex-delimiter-boundaries
  • fix/seo-unique-titles
  • main

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

Relevant lines Covered
Build:
Build:
1006 RELEVANT LINES 973 COVERED LINES
5507.15 HITS PER LINE
Source Files on main
  • Tree
  • List 126
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
25363806545 fix/katex-delimiter-boundaries 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 ... push 05 May 2026 07:38AM UTC web-flow github
93.42
25349490320 fix/seo-unique-titles feat(extensions): add first-class KaTeX extension (#281) * feat(extensions): add first-class KaTeX extension Promotes KaTeX to a built-in extension at @humanspeak/svelte-markdown/extensions, mirroring the existing mermaid/alert/footnote pattern.... push 04 May 2026 11:39PM UTC web-flow github
93.42
24424846169 fix/seo-unique-titles Merge pull request #279 from humanspeak/fix/seo-unique-titles chore: update docs marketing, CI workflows, and dependencies push 14 Apr 2026 09:57PM UTC web-flow github
93.14
24219121030 fix/seo-unique-titles Merge pull request #276 from humanspeak/fix/seo-unique-titles fix(types): add missing properties to SnippetProps interfaces push 09 Apr 2026 11:55PM UTC web-flow github
93.14
24099788293 fix/seo-unique-titles Merge pull request #273 from humanspeak/fix/seo-unique-titles fix: add built-in URL and attribute sanitization to prevent XSS push 07 Apr 2026 07:17PM UTC web-flow github
92.67
23827349440 fix/seo-unique-titles Merge pull request #269 from humanspeak/fix/seo-unique-titles feat: add imperative streaming API with tail-window optimization push 01 Apr 2026 01:25AM UTC web-flow github
92.58
23521565152 fix/seo-unique-titles Merge pull request #268 from humanspeak/fix/seo-unique-titles fix: resolve cyclic object error in streaming mode push 25 Mar 2026 02:13AM UTC web-flow github
90.97
23520996690 fix/seo-unique-titles Merge pull request #267 from humanspeak/fix/seo-unique-titles feat: add streaming prop for optimized LLM response rendering push 25 Mar 2026 01:50AM UTC web-flow github
91.14
23513255494 fix/seo-unique-titles Merge pull request #266 from humanspeak/fix/seo-unique-titles docs: add LLM streaming example and documentation push 24 Mar 2026 09:35PM UTC web-flow github
93.87
23232113997 fix/seo-unique-titles Merge pull request #265 from humanspeak/fix/seo-unique-titles fix: code audit — type safety, correctness, and security improvements push 18 Mar 2026 06:31AM UTC web-flow github
93.87
See All Builds (133)
  • Repo 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