parseDocument function
MdDocument
parseDocument(
- String src,
- bool useDollar, [
- MarkdownBlockRegistry? registry,
- MarkdownDefinitions? definitions,
- MarkdownHtml? html,
Parses src. Link and footnote definitions are collected from src
itself unless definitions is given — the incremental view passes the
whole document's, because it parses one segment at a time.
Implementation
MdDocument parseDocument(
String src,
bool useDollar, [
MarkdownBlockRegistry? registry,
MarkdownDefinitions? definitions,
MarkdownHtml? html,
]) {
final lines = documentLines(src);
final defs =
definitions ??
MarkdownDefinitions.collectLines(
lines,
blockRegistry: registry,
html: html,
);
return MdDocument(
children: parseBlocks(lines, useDollar, registry, defs, html),
);
}