render mathjax in svg by default (TNL-4145)

mathjax preview should be inline by default
This commit is contained in:
Adam Palay
2016-02-22 10:08:55 -05:00
committed by Michael Frey
parent 2cb48742b2
commit c63dcf0dfe
12 changed files with 14 additions and 14 deletions

View File

@@ -139,7 +139,7 @@ describe("Formula Equation Preview", function () {
// Either it makes a request or jumps straight into displaying ''.
waitsFor(function () {
// (Short circuit if `inputAjax` is indeed called)
return Problem.inputAjax.wasCalled ||
return Problem.inputAjax.wasCalled || // jshint ignore:line
MathJax.Hub.Queue.wasCalled;
}, "AJAX never called on user input", 1000);
@@ -266,7 +266,7 @@ describe("Formula Equation Preview", function () {
// We should look in the preview div for the MathJax.
var previewElement = $("#input_THE_ID_preview")[0];
expect(previewElement.firstChild.data).toEqual("\\[THE_FORMULA\\]");
expect(previewElement.firstChild.data).toEqual("\\(THE_FORMULA\\)");
// Refresh the MathJax.
expect(MathJax.Hub.Queue).toHaveBeenCalledWith(

View File

@@ -145,7 +145,7 @@ formulaEquationPreview.enable = function () {
console.log("[FormulaEquationInput] Oops no mathjax for ", latex);
// Fall back to modifying the actual element.
var textNode = previewElement.childNodes[0];
textNode.data = "\\[" + latex + "\\]";
textNode.data = "\\(" + latex + "\\)";
MathJax.Hub.Queue(["Typeset", MathJax.Hub, previewElement]);
}
});