Skip to content

Commit cfaf3d2

Browse files
content: Populate debugHtmlNode for KatexNode
1 parent 3e80a0d commit cfaf3d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/model/katex.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ class _KatexParser {
131131
KatexNode _parseSpan(dom.Element element) {
132132
// TODO maybe check if the sequence of ancestors matter for spans.
133133

134+
final debugHtmlNode = kDebugMode ? element : null;
135+
134136
// Aggregate the CSS styles that apply, in the same order as the CSS
135137
// classes specified for this span, mimicking the behaviour on web.
136138
//
@@ -353,7 +355,8 @@ class _KatexParser {
353355
return KatexNode(
354356
styles: styles,
355357
text: text,
356-
nodes: spans);
358+
nodes: spans,
359+
debugHtmlNode: debugHtmlNode);
357360
}
358361
}
359362

0 commit comments

Comments
 (0)