From dcb1c14353360ff408848643b77e4eaa412480dd Mon Sep 17 00:00:00 2001 From: dpvc Date: Fri, 6 Aug 2010 11:43:36 +0000 Subject: [PATCH] Set text of script rather than move MathML element into script (slower, but avoids bugs in getting the text version of the script for Show Source). Resolves remainder of bug 3040088.) --- mathjax/unpacked/extensions/mml2jax.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mathjax/unpacked/extensions/mml2jax.js b/mathjax/unpacked/extensions/mml2jax.js index 63d07ab83..45a0eccdc 100644 --- a/mathjax/unpacked/extensions/mml2jax.js +++ b/mathjax/unpacked/extensions/mml2jax.js @@ -24,6 +24,7 @@ */ MathJax.Extension.mml2jax = { + varsion: "1.0.1", config: { element: null, // The ID of the element to be processed // (defaults to full document) @@ -69,7 +70,8 @@ MathJax.Extension.mml2jax = { script.text = html; parent.removeChild(math); } else { - script.appendChild(math); + var span = MathJax.HTML.Element("span"); span.appendChild(math); + MathJax.HTML.addText(script,span.innerHTML); } if (this.config.preview !== "none") {this.createPreview(math,script)} },