Files
94829325fb fix(lint): only remove paired whole-document Markdown fences (#2741 takeover)
lint --fix stripped the opening ```markdown fence and the closing fence
at EOF independently, so a legitimate document that merely ENDS in a
fenced code example lost its closing fence. PR #2741 paired the two
fences correctly, but its regex tail (`[^\S\r\n]*$`) required the
closing fence at absolute end-of-string — a wrapped file with a normal
trailing newline no longer matched, so detection kept flagging
code-fence-wrap while --fix silently did nothing.

Fix: one shared DOC_FENCE_WRAPPER regex (paired fences, `\s*$` tail
tolerating trailing newlines) used by BOTH detection and fixContent, so
they can never disagree again. Detection also stops flagging documents
that only end in a legit fenced example.

Co-authored-by: codxt <codxt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:53:07 -07:00
..