close method
Node?
close(
- InlineParser parser,
- Delimiter opener,
- Delimiter closer, {
- required List<
Node> getChildren(),
Attempts to close this tag at the current position.
If a tag cannot be closed at the current position (for example, if a link
reference cannot be found for a link tag's label), then null is
returned.
If a tag can be closed at the current position, then this method calls
getChildren, in which parser parses any nested text into child nodes.
The returned Node incorpororates these child nodes.
Implementation
Node? close(InlineParser parser, Delimiter opener, Delimiter closer,
{required List<Node> Function() getChildren}) {
var strong = opener.length >= 2 && closer.length >= 2;
return Element(strong ? 'strong' : 'em', getChildren());
}