Browse Source

Inline KaTeX musí zůstat inline i v HTML jinak přidává mezery, kam nemá.

error-handling
Jan Černohorský 1 year ago
parent
commit
05ffd321d8
  1. 6
      src/formatitko/html_generator.py

6
src/formatitko/html_generator.py

@ -243,7 +243,11 @@ class HTMLGenerator(OutputGenerator):
"DisplayMath": True, "DisplayMath": True,
"InlineMath": False "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): def generate_RawInline(self, e: RawInline):
if e.format == "html": if e.format == "html":

Loading…
Cancel
Save