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);
children.clear();
if (!text.contains(htmlRep)) {
accept(TextNode(text: text, style: textStyle));
return;
}
final spans = parseHtml(
m.Text(text),
visitor:
WidgetVisitor(config: visitor.config, generators: visitor.generators),
parentStyle: parentStyle,
);
for (var element in spans) {
accept(element);
}
}