parse method

  1. @override
Node parse(
  1. BlockParser parser
)
override

Implementation

@override
Node parse(BlockParser parser) {
  final childLines = parseChildLines(parser)
    // The Markdown tests expect a trailing newline.
    ..add('');

  // Escape the code.
  final escaped = escapeHtml(childLines.join('\n'));

  return Element('pre', [Element.text('code', escaped)]);
}