collectDefinitions function

DefinitionSink collectDefinitions(
  1. List<String> lines,
  2. MarkdownBlockRegistry? registry, [
  3. MarkdownHtml? html
])

The definitions in lines, found by the block pass itself: what it accepts as a definition, and every [^label] reference in the text it would hand to the inline parser, in reading order.

Implementation

DefinitionSink collectDefinitions(
  List<String> lines,
  MarkdownBlockRegistry? registry, [
  MarkdownHtml? html,
]) {
  final sink = DefinitionSink();
  _BlockParser(
    false,
    registry,
    MarkdownDefinitions.empty,
    sink,
    html ?? MarkdownHtml.defaults,
  ).blocks(lines);
  return sink;
}