From c48fabff8160269caac3f47e7347ddd641f2cfb1 Mon Sep 17 00:00:00 2001 From: Davide Cervone 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.) git-svn-id: https://mathjax.svn.sourceforge.net/svnroot/mathjax/trunk@566 b8fd5906-0fad-46e2-a0d3-10d94ff285d1 --- 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)} },