commit 501b96c859c0402acea1b53157c74d8c380033a0
parent 252fda676253f6a921fa669bc82bc655ef1d8c1b
Author: Davide P. Cervone <dpvc@union.edu>
Date: Fri, 26 Dec 2014 17:49:59 -0500
Save preview in script.MathJax to fix issue #975.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/unpacked/extensions/CHTML-preview.js b/unpacked/extensions/CHTML-preview.js
@@ -86,10 +86,11 @@
Preview: function (data) {
if (this.config.disabled || !SETTINGS.CHTMLpreview ||
SETTINGS.renderer === "CommonHTML") return;
- var preview = data.script.previousSibling;
+ var preview = data.script.MathJax.preview || data.script.previousSibling;
if (!preview || preview.className !== MathJax.Hub.config.preRemoveClass) {
preview = HTML.Element("span",{className:MathJax.Hub.config.preRemoveClass});
data.script.parentNode.insertBefore(preview,data.script);
+ data.script.MathJax.preview = preview;
}
preview.innerHTML = "";
return this.postFilter(preview,data);