From dd6611ee38146dbda60886af8377bf803581269f Mon Sep 17 00:00:00 2001 From: Alexey Filippov Date: Mon, 13 Apr 2020 08:54:38 +0100 Subject: [PATCH 1/2] #32 Only process markdown --- mathjax_config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mathjax_config.js b/mathjax_config.js index 362f75f5..511721d4 100644 --- a/mathjax_config.js +++ b/mathjax_config.js @@ -4,6 +4,8 @@ window.MathJax = { tex2jax: { inlineMath: [ ["$","$"] ], displayMath: [ ["$$","$$"] ], + ignoreClass: "application-main", + processClass: "markdown-body", processEscapes: true }, imageFont: null, From 819b7da5eb6c3b335a49181ce3fddee400e637f8 Mon Sep 17 00:00:00 2001 From: Alexey Filippov Date: Mon, 13 Apr 2020 12:44:49 +0100 Subject: [PATCH 2/2] #32 Allow MathJax in PR comments --- dynamic_math.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dynamic_math.js b/dynamic_math.js index e528cc5d..b20820b7 100644 --- a/dynamic_math.js +++ b/dynamic_math.js @@ -1,7 +1,8 @@ function render_preview() { $(".js-preview-tab").on("click", function(e) { function didLoadPreview() { - if (!$(".js-preview-tab").hasClass('selected')) { + let tab = $(".js-preview-tab"); + if (!tab.hasClass('selected') && !tab.attr("aria-selected")) { return; } if ($(".preview-content").attr('display') == 'none') {