onAccepted method
when this node was accepted by it's parent, onAccepted will be triggered
Implementation
@override
void onAccepted(SpanNode parent) {
final textStyle = config.p.textStyle.merge(parentStyle);
// Handle special tags
for (var handler in (tagHandlers ?? [])) {
if (text.contains(RegExp('<${handler.tag}[^>]*>'))) {
customTag = handler.tag;
customContent = contentFromText(handler.tag, text);
customAttributes = attributesFromText(handler.tag, text);
accept(ConcreteElementNode(tag: handler.tag));
return;
}
}
// Handle everything else
accept(TextNode(text: text, style: textStyle));
}