onMatch method
Processes match
, adding nodes to parser
and possibly advancing
parser
.
Returns whether the caller should advance parser
by match[0].length
.
Implementation
@override
bool onMatch(InlineParser parser, Match match) {
var url = match[1]!;
var text = parser._encodeHtml ? escapeHtml(url) : url;
var anchor = Element.text('a', text);
anchor.attributes['href'] = Uri.encodeFull('mailto:$url');
parser.addNode(anchor);
return true;
}