← Back to Pull requests

fix: allow zero-padded ordered lists starting at 1 to interrupt paragraphs #4291

Closed
unknown closed this pull request without merging on Nov 30, 2026 16:53 UTC
View on GitHub
unknown unknown commented on Nov 27, 2026 13:35 UTC
Author

Marked version: 18.2.0 - 18.3.0

Markdown flavor: CommonMark|GitHub Flavored Markdown

Description

  • Fixes #4289
  • other.listInterruptsParagraph, blockNormal.paragraph, blockGfm.paragraph, and gfmTable matched literal 1[.)] instead of any 1–9 digit ordered-list marker with start number 1 (0{0,8}1[.)]). As a result, zero-padded ordered lists like 01. b failed to interrupt paragraphs (including nested lists inside a list item since 18.2.0) and GFM tables.

    This updates the paragraph/table list-interruption pattern from 1[.)] to 0{0,8}1[.)] (keeping 00., 02., 10-digit 0000000001., and empty 01. non-interrupting per CommonMark §5.2/§5.3) and reuses other.listInterruptsParagraph in paragraph and blockGfm.paragraph. Verified all 4 modified regexes remain safe with test/recheck.ts.

    Demo links (- a\n 01. b\n 02. c, {"gfm":true}):

  • 18.3.0 (current)

  • 18.1.3 (expected)

  • CommonMark reference
  • Contributor

  • Test(s) exist to ensure functionality and minimize regression (added test/specs/new/zero_padded_ordered_list_interrupt.{md,html} and test/specs/new/zero_padded_ordered_list_interrupt_nogfm.{md,html}); or,

  • no tests required for this PR.

  • If submitting new feature, it has been documented in the appropriate places.
  • Committer

    In most cases, this should be a different person than the contributor.

  • CI is green (no forced merge required).

  • Squash and Merge PR following conventional commit guidelines.
  • Diff: 244 lines (+183 / -61) across 3 files Reviewer: UziTech Review duration: 4518m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 244 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.329
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4291"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 38.8% (MEDIUM) · Higher = larger blast radius
    38.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.3% · Safe to merge
    15.3%