Skip to content

Parser: support ~~~ code fences #10

Description

@hermanngeorge15

Problem

The Markdown spec allows ~~~ as an alternative to ``` for fenced code blocks. The parser only handles triple backticks. Headings inside ~~~ fences are incorrectly parsed as real sections.

Proposal

Update src/parser.ts to toggle inCodeBlock on lines starting with ~~~ as well as ```.

Acceptance Criteria

  • Headings inside ~~~ fences are ignored
  • Mixed fence styles work (open with ``` close with ~~~ should NOT work per CommonMark spec)
  • Test added

Labels

bug, parser

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions