www

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

commit 38123ba33d211fe7136d6f66bc6b10c184ccce88
parent c4da088220929b63af5e36915f1225d24706df14
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Tue, 16 Apr 2013 20:37:27 -0400

Add the MathJax_Preview class to the ignoreClass list so that tex2jax and asciimath2jax won't process previews accidentally.  Resolves part of issue#378.

Diffstat:
Munpacked/extensions/asciimath2jax.js | 6++++--
Munpacked/extensions/tex2jax.js | 6++++--
2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/unpacked/extensions/asciimath2jax.js b/unpacked/extensions/asciimath2jax.js @@ -27,7 +27,7 @@ */ MathJax.Extension.asciimath2jax = { - version: "2.1.1", + version: "2.1.2", config: { delimiters: [['`','`']], // The star/stop delimiter pairs for asciimath code @@ -75,7 +75,9 @@ MathJax.Extension.asciimath2jax = { } this.start = new RegExp(starts.sort(this.sortLength).join("|"),"g"); this.skipTags = new RegExp("^("+config.skipTags.join("|")+")$","i"); - this.ignoreClass = new RegExp("(^| )("+config.ignoreClass+")( |$)"); + var ignore = MathJax.Hub.config.preRemoveClass; + if (config.ignoreClass !== "") {ignore += "|" + config.ignoreClass} + this.ignoreClass = new RegExp("(^| )("+ignore+")( |$)"); this.processClass = new RegExp("(^| )("+config.processClass+")( |$)"); return true; }, diff --git a/unpacked/extensions/tex2jax.js b/unpacked/extensions/tex2jax.js @@ -24,7 +24,7 @@ */ MathJax.Extension.tex2jax = { - version: "2.1.1", + version: "2.1.2", config: { inlineMath: [ // The start/stop pairs for in-line math // ['$','$'], // (comment out any you don't want, or add your own, but @@ -107,7 +107,9 @@ MathJax.Extension.tex2jax = { if (config.processRefs) {parts.push("\\\\(eq)?ref\\{[^}]*\\}")} this.start = new RegExp(parts.join("|"),"g"); this.skipTags = new RegExp("^("+config.skipTags.join("|")+")$","i"); - this.ignoreClass = new RegExp("(^| )("+config.ignoreClass+")( |$)"); + var ignore = MathJax.Hub.config.preRemoveClass; + if (config.ignoreClass !== "") {ignore += "|" + config.ignoreClass} + this.ignoreClass = new RegExp("(^| )("+ignore+")( |$)"); this.processClass = new RegExp("(^| )("+config.processClass+")( |$)"); return (parts.length > 0); },