Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/pretext-stack/stackapicalls.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const stackstring = {
function wrap_math(content) {
// Wrap instances of \[ ... \] and \( ... \) into the tags configured to be processed by MathJax
// Here we make sure that the backslashes are not escaped like \\[
content = content.replace(/(?<!\\)(\\\(.*?(?<!\\)\\\))/g, "<span class=\"process-math\">$1</span>");
return content.replace(/(?<!\\)(\\\[.*?(?<!\\)\\\])/g, "<span class=\"process-math\">$1</span>");
content = content.replace(/(?<!\\)(\\\(.*?(?<!\\)\\\))/gs, "<span class=\"process-math\">$1</span>");
return content.replace(/(?<!\\)(\\\[.*?(?<!\\)\\\])/gs, "<span class=\"process-math\">$1</span>");
}

// Create data for call to API.
Expand Down