fix(docs-hygiene): close nested fences only on a matching-or-longer delimiter (0.21.3) - #3227
Conversation
…elimiter audit-noise flipped a single in_fence boolean on any line beginning with three or more backticks or tildes. A four-backtick outer fence wrapping a three-backtick example therefore closed at the inner fence, and the rest of the example was scanned as prose. Record the opening delimiter character and run length, and treat a later fence line as the close only when it uses the same character at a run length greater than or equal to the opener. Closes #3190 Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
|
Claude finished @kyle-sexton's task in 1m 11s —— View job Security Review
No security issues found. This PR changes the fence-tracking state machine in Scope assessed:
No injection, auth/access-control, secret-handling, or GitHub Actions workflow changes in this diff. Skip-gate condition (no security-relevant surface) applies — nothing further to report. |
|
Last security-reviewed head: |
|
Claude finished @kyle-sexton's task in 1m 21s —— View job /review:code-review
Skip gate triggered: PR #3227 is already merged (base For reference, the merged change ( If you'd like a substantive review of this change despite the merge, let me know and I'll do a full pass against |
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
Closes #3190
Summary
audit-noiseflipped a singlein_fenceboolean on any line beginning with three or more backticks or tildes. A four-backtick outer fence wrapping a three-backtick example therefore closed at the inner fence, and everything between the inner close and the true outer close was scanned as prose.This is shared pre-shape infrastructure — every finding shape inherited the false positive. The reported case is
docs/conventions/finding-suppression/README.md:64, aticket-pr-residuehit on an example suppression record inside a documentation fence.Fix
The tracker now records the opening delimiter character and run length, and treats a later fence line as the close only when it uses the same character at a run length greater than or equal to the opener (CommonMark's close rule). Ordinary three-backtick and tilde fences are unchanged.
Verification
detect.test.sh— 139 checks passed, including a nested ```` / ``` fixture and a tilde-fence regressiondetect.sh docs/conventions/finding-suppression/README.mdreportsT2=0(wasticket-pr-residueon line 64)skill-quality:check docs-hygiene:audit-noise— PASScheck-changelog-parity.sh --check-bump origin/main— PASSRelated