fix: strip indentation from tilde fence contents #4281
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.37) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 217 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.322
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4281"
general
weight: 0.35
UziTech
Marked version: 18.3.0, commit
5c0869fMarkdown flavor: CommonMark and GFM
Description
A tilde fence indented by two spaces leaves those spaces in the rendered code. For example, the following renders a line beginning with two spaces before
print(1). CommonMark removes the two spaces. Marked demo · CommonMark comparisonApply indentation removal to either fence character. At the root, a tab that crosses the removal boundary leaves its unconsumed columns as spaces. Non-ASCII whitespace and tabs beyond the boundary remain literal code. In containers, a partially consumed tab may depend on a source column that the tokenizer no longer has. Those lines retain their existing behavior. #4129 covers restoring tabs expanded by the list tokenizer.
npm testpasses locally, including 2,051 spec executions and 275 unit tests. The exact-output fixture fails on master and passes with this change in both Markdown modes. I also compared the resulting code text with commonmark.js on 3,072 inputs covering root fences, quotes and lists. All 512 root cases match. Across the matrix, 422 previously different results now match and all previously matching results are preserved.OpenAI Codex assisted with the implementation and validation.
Contributor
Committer