parseChildLines method
Implementation
@override
List<String?> parseChildLines(BlockParser parser) {
var childLines = <String?>[];
while (!parser.isDone) {
var match = pattern.firstMatch(parser.current);
if (match != null) {
childLines.add(match[1]);
parser.advance();
} else {
// If there's a codeblock, then a newline, then a codeblock, keep the
// code blocks together.
var nextMatch =
parser.next != null ? pattern.firstMatch(parser.next!) : null;
if (parser.current.trim() == '' && nextMatch != null) {
childLines.add('');
childLines.add(nextMatch[1]);
parser.advance();
parser.advance();
} else {
break;
}
}
}
return childLines;
}