Add the MathJax_Preview class to the ignoreClass list so that tex2jax and asciimath2jax won't process previews accidentally. Resolves part of issue#378.
This commit is contained in:
parent
c4da088220
commit
38123ba33d
|
@ -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;
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user