fix: don't treat a backtick fence with a backtick in its info string as a fence opener #4268
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.42) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 323 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.346
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #4268"
general
weight: 0.35
UziTech
Marked version: 18.2.1 (master at 6c2a5ab4)
Markdown flavor: CommonMark|GitHub Flavored Markdown
Description
Expectation
CommonMark §4.5: the info string after a backtick fence can't contain a backtick, so a line like ```
````is not a fence opener. It's ordinary paragraph text, so it can be a setext heading's content and a lazy continuation line in a list item.===
</h1>, and`````in the list item's paragraph.Result
\n===</p>(master, commonmark)````becomes a separate paragraph (master, commonmark)The fences
tokenizer and the paragraph interrupt rule already reject these lines, but thelheadinglookaheads ({0,3}(?:{3,}|~{3,})`) andfencesBeginRegex(used bylist()) match any line that starts with three backticks.What changed
/lheadingGfm: the fence lookahead only matches a backtick fence when the rest of the line has no backtick, same as thefencesrule and the paragraph interrupt.: same check, so an invalid fence line no longer ends a list item, either as the next line or as the line before a lazy line.Contributor
Committer
In most cases, this should be a different person than the contributor.