Skip to content

Commit dd2ac51

Browse files
committed
Fix problem with identifying display math due to change from looking of frame to using previousSibling.
1 parent f6c72b4 commit dd2ac51

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

unpacked/jax/output/HTML-CSS/jax.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,8 @@
683683
// Get the data about the math
684684
//
685685
var jax = script.MathJax.elementJax, math = jax.root,
686-
span = script.previousSibling;
687-
div = (jax.HTMLCSS.display ? (span||{}).parentNode : span);
686+
div = script.previousSibling;
687+
span = (jax.HTMLCSS.display ? (div||{}).firstChild||div : div);
688688
if (!div) return;
689689
//
690690
// Set the font metrics

unpacked/jax/output/SVG/jax.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@
315315
// Get the data about the math
316316
//
317317
var jax = script.MathJax.elementJax, math = jax.root,
318-
span = script.previousSibling;
319-
div = (jax.SVG.display ? (span||{}).parentNode : span),
318+
div = script.previousSibling;
319+
span = (jax.SVG.display ? (div||{}).firstChild||div : div),
320320
localCache = (SVG.config.useFontCache && !SVG.config.useGlobalCache);
321321
if (!div) return;
322322
//

0 commit comments

Comments
 (0)