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.)

This commit is contained in:
dpvc 2010-08-06 11:43:36 +00:00
parent b225ce154a
commit dcb1c14353

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