parseReplacedElement function
Implementation
ReplacedElement parseReplacedElement(
dom.Element element,
List<StyledElement> children,
) {
switch (element.localName) {
case "br":
return TextContentElement(
text: "\n",
style: Style(whiteSpace: WhiteSpace.PRE),
element: element,
node: element
);
case "ruby":
return RubyElement(
element: element,
children: children,
);
default:
return EmptyContentElement(name: element.localName == null ? "[[No Name]]" : element.localName!);
}
}