Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit d83af60

Browse files
committed
merge master
2 parents 00a6e76 + 699ac11 commit d83af60

5 files changed

Lines changed: 17 additions & 5 deletions

File tree

runestone/common/js/runestonebase.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,14 @@ export default class RunestoneBase {
364364
return `${this.constructor.name}: ${this.divid}`
365365
}
366366

367+
queueMathJax(component) {
368+
if (MathJax.version.substring(0, 1) === "2") {
369+
MathJax.Hub.Queue(["Typeset", MathJax.Hub, component]);
370+
} else {
371+
MathJax.typesetPromise([component])
372+
}
373+
}
374+
367375
}
368376

369377
window.RunestoneBase = RunestoneBase;

runestone/fitb/js/fitb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export default class FITB extends RunestoneBase {
339339
}
340340
this.feedBackDiv.innerHTML = feedback_html;
341341
if (typeof MathJax !== "undefined") {
342-
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
342+
this.queueMathJax(document.body)
343343
}
344344
}
345345

runestone/parsons/js/parsons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ export default class Parsons extends RunestoneBase {
591591
this.initializeTabIndex();
592592
if (this.options.language == "natural" || this.options.language == "math") {
593593
if (typeof MathJax !== "undefined") {
594-
MathJax.Hub.Queue(["Typeset", MathJax.Hub, this.outerDiv]);
594+
this.queueMathJax(this.outerDiv)
595595
}
596596
}
597597
}

runestone/shortanswer/js/shortanswer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default class ShortAnswer extends RunestoneBase {
127127
// before MathJax is loaded. In that case we will need to implement something
128128
// like `the solution described here <https://stackoverflow.com/questions/3014018/how-to-detect-when-mathjax-is-fully-loaded>`_
129129
if (typeof MathJax !== "undefined") {
130-
MathJax.Hub.Queue(["Typeset", MathJax.Hub, this.containerDiv]);
130+
this.queueMathJax(this.containerDiv)
131131
}
132132
}
133133

@@ -136,7 +136,7 @@ export default class ShortAnswer extends RunestoneBase {
136136
value = value.replace(/\$\$(.*?)\$\$/g, "\\[ $1 \\]");
137137
value = value.replace(/\$(.*?)\$/g, "\\( $1 \\)");
138138
$(this.renderedAnswer).text(value);
139-
MathJax.Hub.Queue(["Typeset", MathJax.Hub, this.renderedAnswer]);
139+
this.queueMathJax(this.renderedAnswer)
140140
}
141141
}
142142

@@ -287,7 +287,7 @@ $(document).bind("runestone:login-complete", function () {
287287
useRunestoneServices: eBookConfig.useRunestoneServices,
288288
});
289289
} catch (err) {
290-
console.log(`Error rendering ClickableArea Problem ${this.id}
290+
console.log(`Error rendering ShortAnswer Problem ${this.id}
291291
Details: ${err}`);
292292
}
293293
}

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010
with open("requirements.txt", "r", encoding="utf-8") as fh:
1111
dependencies = [l.strip() for l in fh]
1212

13+
<<<<<<< HEAD
1314

1415
VERSION = "6.0.0dev"
16+
=======
17+
VERSION = "5.10.0"
18+
>>>>>>> master
1519

1620
# These pre-install hooks are useful to make sure any pre-requisite
1721
# programs that are not pip installable are in place.

0 commit comments

Comments
 (0)