How kuankuan2007/k-markdown-parser works
k-markdown-parser is a dependency-free Markdown-to-AST library. A caller supplies Markdown to KMarkdownParser.parse; the parser normalizes escapes, applies configurable syntax groups, recursively parses eligible node content, and returns a root node. Its documented capabilities include block and inline Markdown constructs, tables and lists, XML-like tags, customizable syntax groups and node classes, and text conversion helpers. The graph groups related syntax modules by parsing stage; their exact internal wiring is not fully sampled, so only the parser-to-syntax dispatch supported by the parser and default configuration is shown.
Main entry points: parser.ts Markdown Parser · options.ts Parser Options · syntaxes Inline Syntax · textConverter.ts Text Converter
Components 10
Parser API
- Markdown Parser
src/parser.ts - Parser Options
src/options.ts
Text Preparation
- Text Converter
src/textConverter.ts
Syntax Stages
- Block Syntax
src/syntaxes - Structural Syntax
src/syntaxes - Inline Syntax
src/syntaxes - Pair Matcher
src/util/matchPairs.ts
AST Construction
- Core Node Types
src/nodes/core.ts - Root AST
src/nodes/core.ts
Other components
- Library Caller
Connections 14
- Library Caller → Markdown Parser: calls parse
- Markdown Parser → Parser Options: builds options
- Markdown Parser → Text Converter: normalizes text
- Markdown Parser → Parser Options: builds syntax groups
- Markdown Parser → Block Syntax: dispatches rules
- Markdown Parser → Structural Syntax: dispatches rules
- Markdown Parser → Inline Syntax: dispatches rules
- Markdown Parser → Core Node Types: instantiates nodes
- Markdown Parser → Root AST: returns AST
- Parser Options → Block Syntax: configures rules
- Parser Options → Structural Syntax: configures rules
- Parser Options → Inline Syntax: configures rules
- Inline Syntax → Pair Matcher: matches delimiters
- Library Caller → Text Converter: uses conversions