From c82ff06a82930f026f76573a02002133ad1ebd96 Mon Sep 17 00:00:00 2001 From: Moritz Schubotz Date: Tue, 5 Aug 2014 15:55:59 -0400 Subject: [PATCH] Update jax.js This is a draft only... see discussion on https://groups.google.com/forum/?hl=en#!searchin/mathjax-users/amber/mathjax-users/3j3AlkBA1CA/vKVfu7hixQwJ --- unpacked/jax/input/MathML/jax.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unpacked/jax/input/MathML/jax.js b/unpacked/jax/input/MathML/jax.js index a97d9ceeca..2d72a2359b 100644 --- a/unpacked/jax/input/MathML/jax.js +++ b/unpacked/jax/input/MathML/jax.js @@ -159,7 +159,10 @@ 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))); + if ( child.parentNode.localName !== "annotation" ) { + text = this.trimSpace(text); + } + mml.Append(MML.chars(text)); } else if (child.nodeValue.match(/\S/)) { MATHML.Error(["UnexpectedTextNode", "Unexpected text node: %1","'"+child.nodeValue+"'"]);