Partial work-around for issue#89: have <br> insert a newline in IE when documentMode < 9
This commit is contained in:
parent
2051c9aa58
commit
af0b052702
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
File diff suppressed because one or more lines are too long
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
MathJax.Extension.tex2jax = {
|
||||
version: "1.1",
|
||||
version: "1.1.1",
|
||||
config: {
|
||||
element: null, // The ID of the element to be processed
|
||||
// (defaults to full document)
|
||||
|
@ -216,7 +216,11 @@ MathJax.Extension.tex2jax = {
|
|||
} else {
|
||||
math.nodeValue += math.nextSibling.nodeValue;
|
||||
}
|
||||
} else {math.nodeValue += ' '}
|
||||
} else if (this.msieNewlineBug) {
|
||||
math.nodeValue += (math.nextSibling.nodeName.toLowerCase() === "br" ? "\n" : " ");
|
||||
} else {
|
||||
math.nodeValue += " ";
|
||||
}
|
||||
math.parentNode.removeChild(math.nextSibling);
|
||||
}
|
||||
var TeX = math.nodeValue.substr(search.olen,math.nodeValue.length-search.olen-search.clen);
|
||||
|
@ -251,7 +255,9 @@ MathJax.Extension.tex2jax = {
|
|||
return script;
|
||||
},
|
||||
|
||||
filterTeX: function (tex) {return tex}
|
||||
filterTeX: function (tex) {return tex},
|
||||
|
||||
msieNewlineBug: (MathJax.Hub.Browser.isMSIE && document.documentMode < 9)
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user