formatMarkdownTree function

String formatMarkdownTree(
  1. String data
)

Returns a human-readable debug representation of the markdown AST for data.

Implementation

String formatMarkdownTree(String data) {
  final nodes = _parseMarkdownNodes(data);
  if (nodes.isEmpty) return '';
  return nodes.map((node) => node.toDebugString()).join('\n');
}