Remove internal multiple spaces in token elements (resolves issue #127)

This commit is contained in:
Davide P. Cervone 2011-07-27 16:31:04 -04:00
parent d2b40a3235
commit 3ddd323cd2
10 changed files with 19 additions and 18 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -12,5 +12,5 @@
* http://www.apache.org/licenses/LICENSE-2.0
*/
MathJax.InputJax.MathML=MathJax.InputJax({id:"MathML",version:"1.1.5",directory:MathJax.InputJax.directory+"/MathML",extensionDir:MathJax.InputJax.extensionDir+"/MathML",entityDir:MathJax.InputJax.directory+"/MathML/entities",config:{useMathMLspacing:false}});MathJax.InputJax.MathML.Register("math/mml");MathJax.InputJax.MathML.loadComplete("config.js");
MathJax.InputJax.MathML=MathJax.InputJax({id:"MathML",version:"1.1.6",directory:MathJax.InputJax.directory+"/MathML",extensionDir:MathJax.InputJax.extensionDir+"/MathML",entityDir:MathJax.InputJax.directory+"/MathML/entities",config:{useMathMLspacing:false}});MathJax.InputJax.MathML.Register("math/mml");MathJax.InputJax.MathML.loadComplete("config.js");

File diff suppressed because one or more lines are too long

View File

@ -24,7 +24,7 @@
MathJax.InputJax.MathML = MathJax.InputJax({
id: "MathML",
version: "1.1.5",
version: "1.1.6",
directory: MathJax.InputJax.directory + "/MathML",
extensionDir: MathJax.InputJax.extensionDir + "/MathML",
entityDir: MathJax.InputJax.directory + "/MathML/entities",

View File

@ -104,9 +104,10 @@
},
trimSpace: function (string) {
return string.replace(/^[ \t\n\r]+/,"") // initial whitespace
.replace(/[ \t\n\r]+$/,"") // trailing whitespace
.replace(/[ \t\n\r][ \t\n\r]+/g," "); // internal multiple whitespace
return string.replace(/[\t\n\r]/g," ") // whitespace to spaces
.replace(/^ +/,"") // initial whitespace
.replace(/ +$/,"") // trailing whitespace
.replace(/ +/g," "); // internal multiple whitespace
},
replaceEntity: function (match,entity) {