plusparse/inline_parser library

Inline parser: turns a run of text into inline MdNodes (bold, italic, code, links, images, LaTeX, source tags, …).

CommonMark's algorithm. One left-to-right scan turns what binds tightest — code spans, maths, autolinks, escapes, entities — into finished nodes, and leaves runs of *, _ and ~~ on a delimiter stack and [ / ![ on a bracket stack. A ] resolves its bracket into a link or image as soon as it is seen, and emphasis is matched last, inside each link's text and then across the rest, so *[foo*](url) is a literal * before a link and *foo **bar*** nests the way it reads.

The package's own syntax rides on the same scan: \( … \), \[ … \] and (when enabled) $ … $ maths, [1] citations, [^note] footnotes, ~~ strikethrough and <u> underline.

Functions

parseInline(String text, bool useDollar, [MarkdownDefinitions defs = MarkdownDefinitions.empty, MarkdownHtml? html]) → List<MdNode>
plainText(List<MdNode> nodes) → String
The text nodes read as: what an image's alt text is made of.