www

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

commit 44ee2cf7621ac35716d442454d889edfb89ee9ed
parent 6912edadbb3b67a98f83e7ac3b92156652708c98
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Tue, 24 Jun 2014 17:23:14 -0400

Don't remove entities or newlines from <annotation> elements.  Resolves issue #847.

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+"'"]);