From 69494ca5a4d708e16e35f1daebeaa53e3edbca2c Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 27 Jan 2023 17:05:55 +0100 Subject: [PATCH] FIX: prevents inline span to be forced into blocks (#69) Prior to this fix the "block" style would be used on any node (block or inline). --- assets/javascripts/initializers/discourse-math-mathjax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/initializers/discourse-math-mathjax.js b/assets/javascripts/initializers/discourse-math-mathjax.js index f0e96a4..dd5f6ce 100644 --- a/assets/javascripts/initializers/discourse-math-mathjax.js +++ b/assets/javascripts/initializers/discourse-math-mathjax.js @@ -78,7 +78,7 @@ function decorate(elem, isPreview) { if (elem?.parentElement?.offsetParent !== null) { window.MathJax.Hub.Typeset(mathScript, () => { elem.style.display = "none"; - mathWrapper.style.display = "block"; + mathWrapper.style.display = null; }); } });