highlightAst method
Highlights source using the already parsed node AST.
Implementation
String highlightAst(MarkdownNode node, String source) {
if (source.isEmpty) return '';
final collector = _SpanCollector(source);
node.accept(collector);
return _renderSpans(source, collector.spans);
}