parseMarkdownNodes function

List<Node> parseMarkdownNodes(
  1. String source, {
  2. bool headingIds = true,
})

Parses a Markdown source string into a list of top-level Hasty Nodes.

Implementation

List<Node> parseMarkdownNodes(String source, {bool headingIds = true}) {
  final slugCounts = <String, int>{};
  return _parseBlocks(
    source.replaceAll('\r\n', '\n').split('\n'),
    headingIds: headingIds,
    slugCounts: slugCounts,
  );
}