We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a795c3f commit 7b952eeCopy full SHA for 7b952ee
lib/model/katex.dart
@@ -161,6 +161,8 @@ class _KatexParser {
161
final unsupportedCssClasses = <String>[];
162
final unsupportedInlineCssProperties = <String>[];
163
164
+ final List<String> _ancestorClasses = [];
165
+
166
List<KatexNode> parseKatexHtml(dom.Element element) {
167
assert(element.localName == 'span');
168
assert(element.className == 'katex-html');
@@ -177,7 +179,9 @@ class _KatexParser {
177
179
: 'unsupported html node');
178
180
}
181
182
+ _ancestorClasses.add(node.className);
183
final span = _parseSpan(node);
184
+ assert(_ancestorClasses.removeLast() == node.className);
185
186
if (span is KatexSpanNode) {
187
final marginRightEm = span.styles.marginRightEm;
0 commit comments