Skip to content

Commit

Permalink
feat: Support mfenced. (Sub6Resources#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
fukatani authored May 9, 2023
1 parent c75e0df commit 9ca2308
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/flutter_html_math/lib/flutter_html_math.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ String _parseMathRecursive(dom.Node node, String parsed) {
parsed = "${_parseMathRecursive(nodeList[1], parsed + r"\sqrt[")}]";
parsed = "${_parseMathRecursive(nodeList[0], "$parsed{")}}";
}
if (node.localName == "mfenced") {
String inner = nodeList.map((e) => _parseMathRecursive(e, '')).join(', ');
parsed = "$parsed\\left($inner\\right)";
}
if (node.localName == "mi" ||
node.localName == "mn" ||
node.localName == "mo") {
Expand Down

0 comments on commit 9ca2308

Please sign in to comment.