www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit d6b6b2e24914474d27133073f198249827ae7d66
parent 9fd243d9bd45550d5542d96ef02ab5128401287a
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Mon,  5 Jan 2015 11:04:55 -0500

Fix indenting of toMathML output.

Diffstat:
Munpacked/extensions/toMathML.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/unpacked/extensions/toMathML.js b/unpacked/extensions/toMathML.js @@ -147,7 +147,7 @@ MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () { {annotation = MathJax.InputJax[jax.inputJax].annotationEncoding} var nested = (this.data[0] && this.data[0].data.length > 1); var tag = this.type, attr = this.toMathMLattributes(); - var data = [], SPACE = space + (annotation ? " " : "") + (nested ? " " : ""); + var data = [], SPACE = space + (annotation ? " " + (nested ? " " : "") : "") + " "; for (var i = 0, m = this.data.length; i < m; i++) { if (this.data[i]) {data.push(this.data[i].toMathML(SPACE))} else {data.push(SPACE+"<mrow />")} @@ -162,7 +162,7 @@ MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () { var xmlEscapedTex = jax.originalText.replace(/[&<>]/g, function(item) { return { '>': '&gt;', '<': '&lt;','&': '&amp;' }[item] }); - data.push(space+' <annotation encoding="'+annotation+'">'+xmlEscapedTex+"</annotation>"); + data.push(space+' <annotation encoding="'+annotation+'">'+xmlEscapedTex+"</annotation>"); data.push(space+" </semantics>"); } return space+"<"+tag+attr+">\n"+data.join("\n")+"\n"+space+"</"+tag+">";