Diffdown is a real-time collaborative Markdown editor/previewer built on the AT Protocol diffdown.com
1<!-- /README.md is generated from /src/README.md --> 2 3# @lezer/markdown 4 5This is an incremental Markdown ([CommonMark](https://commonmark.org/) 6with support for extension) parser that integrates well with the 7[Lezer](https://lezer.codemirror.net/) parser system. It does not in 8fact use the Lezer runtime (that runs LR parsers, and Markdown can't 9really be parsed that way), but it produces Lezer-style compact syntax 10trees and consumes fragments of such trees for its incremental 11parsing. 12 13Note that this only _parses_ the document, producing a data structure 14that represents its syntactic form, and doesn't help with outputting 15HTML. Also, in order to be single-pass and incremental, it doesn't do 16some things that a conforming CommonMark parser is expected to 17do—specifically, it doesn't validate link references, so it'll parse 18`[a][b]` and similar as a link, even if no `[b]` reference is 19declared. 20 21The 22[@codemirror/lang-markdown](https://github.com/codemirror/lang-markdown) 23package integrates this parser with CodeMirror to provide Markdown 24editor support. 25 26The code is licensed under an MIT license. 27 28## Interface 29 30@parser 31 32@MarkdownParser 33 34@MarkdownConfig 35 36@MarkdownExtension 37 38@parseCode 39 40### GitHub Flavored Markdown 41 42@GFM 43 44@Table 45 46@TaskList 47 48@Strikethrough 49 50@Autolink 51 52### Other extensions 53 54@Subscript 55 56@Superscript 57 58@Emoji 59 60### Extension 61 62The parser can, to a certain extent, be extended to handle additional 63syntax. 64 65@NodeSpec 66 67@BlockContext 68 69@BlockParser 70 71@LeafBlockParser 72 73@Line 74 75@LeafBlock 76 77@InlineContext 78 79@InlineParser 80 81@DelimiterType 82 83@Element