Skip to content

fix: extended fence parsing and --update block alignment#42

Merged
jlevy merged 2 commits into
mainfrom
fix/block-alignment-and-extended-fences
Feb 22, 2026
Merged

fix: extended fence parsing and --update block alignment#42
jlevy merged 2 commits into
mainfrom
fix/block-alignment-and-extended-fences

Conversation

@jlevy
Copy link
Copy Markdown
Owner

@jlevy jlevy commented Feb 22, 2026

Summary

  • Parser now supports 4+ backtick fences (CommonMark extended fences), allowing nested triple-backtick code blocks in expected output.
  • Fix --update rewriting wrong block when --filter/<!-- only --> runs a subset of tests (same index-mapping bug previously fixed in --expand).
  • Updater and expander preserve original fence length when rewriting blocks.

Test plan

  • 3 new parser tests: extended fence parsing, nested triple backticks, fence-length boundary
  • 2 new updater tests: subset alignment, extended fence preservation
  • All 118 unit tests pass
  • pnpm precommit (format, lint, typecheck, test) passes
  • pnpm build && pnpm publint passes

Closes try-319, try-dz8r.

Made with Cursor

jlevy and others added 2 commits February 21, 2026 16:16
Migrated to tbd for issue tracking; beads remnants no longer needed.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Parser now supports 4+ backtick fences (CommonMark extended fences),
  allowing nested triple-backtick code blocks in expected output.
- Fix --update rewriting wrong block when --filter/<!-- only --> runs a
  subset (same index-mapping bug previously fixed in --expand).
- Updater and expander preserve original fence length when rewriting blocks.

Closes try-319, try-dz8r.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 94.52% 3276 / 3466
🔵 Statements 94.52% 3276 / 3466
🔵 Functions 44.44% 80 / 180
🔵 Branches 42.68% 370 / 867
File CoverageNo changed files found.
Generated in workflow #154 for commit e1dea8c by the Vitest Coverage Report Action

@jlevy jlevy merged commit d025700 into main Feb 22, 2026
1 check passed
@jlevy jlevy deleted the fix/block-alignment-and-extended-fences branch February 22, 2026 00:21
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