File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -327,29 +327,24 @@ class _KatexParser {
327327 if (pstrutHeightEm == null ) throw _KatexHtmlParseError ();
328328 if (pstrutStyles.isNotEmpty) throw _KatexHtmlParseError ();
329329
330- final KatexSpanNode innerSpanNode;
330+ KatexSpanNode child = KatexSpanNode (
331+ styles: styles,
332+ text: null ,
333+ nodes: _parseChildSpans (otherSpans));
331334
332335 if (marginLeftIsNegative) {
333- innerSpanNode = KatexSpanNode (
336+ child = KatexSpanNode (
334337 styles: KatexSpanStyles (),
335338 text: null ,
336339 nodes: [KatexNegativeMarginNode (
337340 leftOffsetEm: marginLeftEm! ,
338- nodes: [KatexSpanNode (
339- styles: styles,
340- text: null ,
341- nodes: _parseChildSpans (otherSpans))])]);
342- } else {
343- innerSpanNode = KatexSpanNode (
344- styles: styles,
345- text: null ,
346- nodes: _parseChildSpans (otherSpans));
341+ nodes: [child])]);
347342 }
348343
349344 rows.add (KatexVlistRowNode (
350345 verticalOffsetEm: (topEm ?? 0 ) + pstrutHeightEm,
351346 debugHtmlNode: kDebugMode ? innerSpan : null ,
352- node: innerSpanNode ));
347+ node: child ));
353348 } else {
354349 throw _KatexHtmlParseError ();
355350 }
You can’t perform that action at this time.
0 commit comments