Properly handle preview of 'none' in all preprocessors, and preview of 'alttext' in mml2jax. See note on commit d2bbe75
.
This commit is contained in:
parent
e253967b72
commit
9178a9af0e
|
@ -204,6 +204,7 @@ MathJax.Extension.asciimath2jax = {
|
|||
|
||||
createPreview: function (mode,asciimath) {
|
||||
var preview = this.config.preview;
|
||||
if (preview === "none") return;
|
||||
if (preview === "AsciiMath") {preview = [this.filterPreview(asciimath)]}
|
||||
if (preview) {
|
||||
preview = MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},preview);
|
||||
|
|
|
@ -177,9 +177,10 @@ MathJax.Extension.mml2jax = {
|
|||
|
||||
createPreview: function (math,script) {
|
||||
var preview = this.config.preview;
|
||||
if (preview === "none") return;
|
||||
if (preview === "alttext") {
|
||||
var text = math.getAttribute("alttext");
|
||||
if (text != null) {preview = [this.filterPreview(text)]}
|
||||
if (text != null) {preview = [this.filterPreview(text)]} else {preview = null}
|
||||
}
|
||||
if (preview) {
|
||||
preview = MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},preview);
|
||||
|
|
|
@ -274,6 +274,7 @@ MathJax.Extension.tex2jax = {
|
|||
|
||||
createPreview: function (mode,tex) {
|
||||
var preview = this.config.preview;
|
||||
if (preview === "none") return;
|
||||
if (preview === "TeX") {preview = [this.filterPreview(tex)]}
|
||||
if (preview) {
|
||||
preview = MathJax.HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass},preview);
|
||||
|
|
Loading…
Reference in New Issue
Block a user