mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 20:10:41 +00:00
The hand-rolled MD parser is replaced with a markdown-it token-stream walker. AstTable and AstCodeBlock are dropped from the AST — the substrate doesn't address into table rows or fence content, and markdown-it's tokenizer already handles "##/- inside fenced code should not be a heading/item" correctly without first-class AST modeling. Grammar opinions move from parser to lint: - Indented `## foo` (1-3 spaces) is now a heading - Empty `## ` is a heading with empty slug - Ordered lists (`1. step`) become items - Nested sub-bullets become items at flat level Each was previously a silent parser refusal — now they are recognized shapes. Lint rules can flag them (`OC_HEADING_INDENTED`, `OC_HEADING_EMPTY`, etc.) where authoring conventions require the narrower shape. Net: parse.ts drops 301 → 207 LoC; tables/code-blocks scenario tests removed wholesale (-251 LoC of test surface that pinned dead AST fields).