Skip to content

feat: unbalanced-bracket pairs the brackets of each heading on its own line - #3003

Open
isamu wants to merge 1 commit into
mainfrom
feat/unbalanced-bracket-headings
Open

isamu wants to merge 1 commit into
mainfrom
feat/unbalanced-bracket-headings

Conversation

@isamu

@isamu isamu commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Summary

unbalanced-bracket reads the body text section by section, and the body text masks heading lines, so a bracket left unopened or unclosed inside a heading was never read: a merged agenda heading with a stray closing corner bracket went unreported.

Each Markdown heading is now paired on its own, over its visible text only: the # marks, inline code and link text are blanked (visibleHeading), positions stay those of the source. The same bracketProblems reads it, so the label rules ((1), 1) after the blanked marks) still hold. The rule's why says so in both languages; the per-rule samples are regenerated.

Items to Confirm / Review

  • yarn corpus gains one finding, read and accepted: a statute guideline heading that opens a full-width round bracket and closes it with a half-width one (a width mismatch, a real slip).
  • Judged corpus: the missed heading bracket is found, no correct finding lost; the one new finding is the same width mismatch. yarn planted unchanged.
  • A heading is paired by itself: a bracket opened in a heading and closed in the body below would now be reported. None in the corpus does this.

Closes #2955

🤖 Generated with Claude Code
work in lab

…n line

Heading lines are masked in the body text, so a bracket left unopened or unclosed in a
heading was never read. Each heading is now paired by itself, over its visible text only
(no # marks, inline code or link text).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

chaff-corpus: itabashi-chogi-r7-16-renraku-chosei-16 — unbalanced-bracket

1 participant