Skip to content

Commit 9ca2308

Browse files
authored
feat: Support mfenced. (Sub6Resources#1174)
1 parent c75e0df commit 9ca2308

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/flutter_html_math/lib/flutter_html_math.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ String _parseMathRecursive(dom.Node node, String parsed) {
8383
parsed = "${_parseMathRecursive(nodeList[1], parsed + r"\sqrt[")}]";
8484
parsed = "${_parseMathRecursive(nodeList[0], "$parsed{")}}";
8585
}
86+
if (node.localName == "mfenced") {
87+
String inner = nodeList.map((e) => _parseMathRecursive(e, '')).join(', ');
88+
parsed = "$parsed\\left($inner\\right)";
89+
}
8690
if (node.localName == "mi" ||
8791
node.localName == "mn" ||
8892
node.localName == "mo") {

0 commit comments

Comments
 (0)