parse method

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

Implementation

@override
Node parse(BlockParser parser) {
  final childLines = parseChildLines(parser);

  var text = childLines.map((e) => e.content).join('\n').trimRight();
  if (parser.previousSyntax != null || parser.parentSyntax != null) {
    text = '\n$text';
    if (parser.parentSyntax is ListSyntax) {
      text = '$text\n';
    }
  }

  return Text(text);
}