From 05ffd321d8f88a1140e7a975f33c9b2a569d5785 Mon Sep 17 00:00:00 2001 From: Greenscreener Date: Wed, 15 Nov 2023 16:03:51 +0100 Subject: [PATCH] =?UTF-8?q?Inline=20KaTeX=20mus=C3=AD=20z=C5=AFstat=20inli?= =?UTF-8?q?ne=20i=20v=20HTML=20jinak=20p=C5=99id=C3=A1v=C3=A1=20mezery,=20?= =?UTF-8?q?kam=20nem=C3=A1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/formatitko/html_generator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/formatitko/html_generator.py b/src/formatitko/html_generator.py index 36c96f9..d7dbc03 100644 --- a/src/formatitko/html_generator.py +++ b/src/formatitko/html_generator.py @@ -243,7 +243,11 @@ class HTMLGenerator(OutputGenerator): "DisplayMath": True, "InlineMath": False } - self.writeraw(self.katexClient.render(e.text, {"displayMode": formats[e.format]})) + rawhtml = self.katexClient.render(e.text, {"displayMode": formats[e.format]}) + if (e.format == "InlineMath"): + self.write(rawhtml) + else: + self.writeraw() def generate_RawInline(self, e: RawInline): if e.format == "html":