From fc1d3d49f0421ee03db2fc40bd3123276b106684 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Fri, 8 Apr 2016 16:17:15 -0400 Subject: [PATCH] Remove previous output that is marked by MathJax_Processed as well as MathJax_Processing. Also could have allowed proper output in issue #1384, though it woud have replaced all the math on the page. --- unpacked/jax/output/PlainSource/jax.js | 2 +- unpacked/jax/output/PreviewHTML/jax.js | 2 +- unpacked/jax/output/SVG/jax.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unpacked/jax/output/PlainSource/jax.js b/unpacked/jax/output/PlainSource/jax.js index a34ca39d4..aa6211564 100644 --- a/unpacked/jax/output/PlainSource/jax.js +++ b/unpacked/jax/output/PlainSource/jax.js @@ -65,7 +65,7 @@ // Remove any existing output // prev = script.previousSibling; - if (prev && String(prev.className).match(/^MathJax_PlainSource(_Display)?( MathJax_Processing)?$/)) { + if (prev && String(prev.className).match(/^MathJax(_PlainSource)?(_Display)?( MathJax_Process(ing|ed))?$/)) { prev.parentNode.removeChild(prev); } // diff --git a/unpacked/jax/output/PreviewHTML/jax.js b/unpacked/jax/output/PreviewHTML/jax.js index 1ff2c6c2e..1b17be10c 100644 --- a/unpacked/jax/output/PreviewHTML/jax.js +++ b/unpacked/jax/output/PreviewHTML/jax.js @@ -185,7 +185,7 @@ // Remove any existing output // prev = script.previousSibling; - if (prev && String(prev.className).match(/^MathJax_PHTML(_Display)?( MathJax_Processing)?$/)) + if (prev && String(prev.className).match(/^MathJax(_PHTML)?(_Display)?( MathJax_Process(ing|ed))?$/)) {prev.parentNode.removeChild(prev)} // // Add the span, and a div if in display mode, diff --git a/unpacked/jax/output/SVG/jax.js b/unpacked/jax/output/SVG/jax.js index ea221f1d7..df991c6dc 100644 --- a/unpacked/jax/output/SVG/jax.js +++ b/unpacked/jax/output/SVG/jax.js @@ -207,7 +207,7 @@ // Remove any existing output // prev = script.previousSibling; - if (prev && String(prev.className).match(/^MathJax(_SVG)?(_Display)?( MathJax(_SVG)?_Processing)?$/)) + if (prev && String(prev.className).match(/^MathJax(_SVG)?(_Display)?( MathJax(_SVG)?_Process(ing|ed))?$/)) {prev.parentNode.removeChild(prev)} // // Add the span, and a div if in display mode,