Skip to content

normalizeListContinuationFences only repairs exactly-4-space fences (misses 5-7) → step collapse #2287

Description

@jung-thomas

What happened

abap-environment-create-rap-business-events rendered with every step from step 4 collapsed into one <pre>. Source cause was an incomplete list-marker outdent (fixed at source in abap-core-development#2746), but the platform's repair parser should have caught it and didn't.

Root cause

scripts/parsers/list-continuation-fence.ts (normalizeListContinuationFences, added for #1931) only matches an opening fence indented at exactly 4 spaces:

const LIST_FENCE_OPEN_4 = /^    (`{3,}|~{3,})(.*)$/   // exactly 4

The offending fence was indented 6 spaces (old 4. marker → content col ~5-6), so it slipped through unrepaired → Goldmark treated it as a doc-level indented code block, backticks rendered literally, and the closing fence opened a never-closed block that swallowed all following steps.

Proposed fix

Generalize the repair to opening fences indented 4-7 spaces (any indent that lands the fence outside the enclosing list item's content column but is clearly meant as a list-continuation fence), stripping enough leading whitespace to bring the delimiter to ≤3. Keep the existing safety guards (matching close required, idempotent, blank-line preservation). Add regression fixtures at 5/6/7-space indents.

Companion (optional)

A source-side CI lint in the tutorial repos that flags a col-0 numbered marker whose continuation fence is indented ≥4 spaces would catch these at author time, before they reach the pipeline.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions