www

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

commit b41981b3b3a9dbb61031de8aaf85d8d4e2d2b0a5
parent 143d071df00a725fd18b370ac1cba4738fa36d13
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Sun, 17 Aug 2014 15:54:09 -0400

Merge pull request #887 from dpvc/issue847

Don't remove entities or newlines from <annotation> elements.  
Diffstat:
Munpacked/jax/input/MathML/jax.js | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/unpacked/jax/input/MathML/jax.js b/unpacked/jax/input/MathML/jax.js @@ -158,8 +158,12 @@ if (child.nodeName === "#comment") continue; if (child.nodeName === "#text") { if ((mml.isToken || mml.isChars) && !mml.mmlSelfClosing) { - var text = child.nodeValue.replace(/&([a-z][a-z0-9]*);/ig,this.replaceEntity); - mml.Append(MML.chars(this.trimSpace(text))); + var text = child.nodeValue; + if (mml.isToken) { + text = text.replace(/&([a-z][a-z0-9]*);/ig,this.replaceEntity); + text = this.trimSpace(text); + } + mml.Append(MML.chars(text)); } else if (child.nodeValue.match(/\S/)) { MATHML.Error(["UnexpectedTextNode", "Unexpected text node: %1","'"+child.nodeValue+"'"]);