From 841596821a9220eadf5ef9f50c37b041b5e2c9e2 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 16 Apr 2013 19:48:11 -0400 Subject: [PATCH] Preserve spaces within \verb arguments. Resolves issue #381. --- unpacked/extensions/TeX/verb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unpacked/extensions/TeX/verb.js b/unpacked/extensions/TeX/verb.js index b6d936e7f..73b96a8b2 100644 --- a/unpacked/extensions/TeX/verb.js +++ b/unpacked/extensions/TeX/verb.js @@ -23,7 +23,7 @@ */ MathJax.Extension["TeX/verb"] = { - version: "2.1" + version: "2.1.1" }; MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { @@ -45,7 +45,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { while (this.i < this.string.length && this.string.charAt(this.i) != c) {this.i++} if (this.i == this.string.length) {TEX.Error("Can't find closing delimiter for "+name)} - var text = this.string.slice(start,this.i); this.i++; + var text = this.string.slice(start,this.i).replace(/ /g,"\u00A0"); this.i++; this.Push(MML.mtext(text).With({mathvariant:MML.VARIANT.MONOSPACE})); }