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

Commit f14a20a

Browse files
committed
make sure to mathjax block contents
1 parent 74f6f40 commit f14a20a

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

runestone/parsons/js/parsons.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ export default class Parsons extends RunestoneBase {
402402
if (this.options.numbered != undefined) {
403403
height_add = 1;
404404
}
405-
if (this.options.language == "natural") {
405+
if (this.options.language == "natural" || this.options.language == "math") {
406406
areaWidth = 300;
407407
maxFunction = function (item) {
408408
item.width(areaWidth - 22);
@@ -589,6 +589,11 @@ export default class Parsons extends RunestoneBase {
589589
this.blocks[i].initializeInteractivity();
590590
}
591591
this.initializeTabIndex();
592+
if (this.options.language == "natural" || this.options.language == "math") {
593+
if (typeof MathJax !== "undefined") {
594+
MathJax.Hub.Queue(["Typeset", MathJax.Hub, this.outerDiv]);
595+
}
596+
}
592597
}
593598
// Make one block be keyboard accessible
594599
initializeTabIndex() {

runestone/parsons/js/parsonsLine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default class ParsonsLine {
2626
this.indent = trimmed.length - this.text.length;
2727
// Create the View
2828
var view;
29-
if (problem.options.language == "natural") {
29+
if (problem.options.language == "natural" || problem.options.language == "math") {
3030
view = document.createElement("p");
3131
} else {
3232
view = document.createElement("code");

0 commit comments

Comments
 (0)