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
This commit is contained in:
Davide Cervone 2010-08-06 11:43:36 +00:00
parent c1109ee95f
commit c48fabff81

View File

@ -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)}
},