canParse method

  1. @override
bool canParse(
  1. BlockParser parser
)
override

Implementation

@override
bool canParse(BlockParser parser) {
  final lastSyntax = parser.currentSyntax;
  if (parser.setextHeadingDisabled || lastSyntax is! ParagraphSyntax) {
    return false;
  }
  return pattern.hasMatch(parser.current.content);
}