You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally the above snippet would be inserted in the preprocess method of a custom renderer. But even when I paste it into the markdown text directly, it is rendered as
instead of
Redcarpet seems to mistakenly insert one tag as raw text:
The bug seems somehow related to the closing </math> tag. It does not manifest when I insert a space or line break before it. What is weird (to me) is that the tag in question is further down to the closing tag, and not even adjacent to it.
The bug seems somehow related to the caret expression ^2. Inserting a space in any place after it (that doesn't break HTML syntax) - like immediately after ^2 or in between any tag, but before the tag that is treated as raw text (<span class="katex-html" aria-hidden="true">) restores correct rendering.
My workaround is to gsub the Katex output and insert the space programmatically, but it'd be nicer if the issue was properly fixed.
Any takes / ideas / better workarounds?
Thanks a bunch!
The text was updated successfully, but these errors were encountered:
zor-el
changed the title
MathML closing tag bug (</math>)
Raw MathML bug
Nov 19, 2023
I've run into this issue while trying to migrate from
Kramdown
.This is the KaTeX output for$E = m c^2$ :
Normally the above snippet would be inserted in the
preprocess
method of a custom renderer. But even when I paste it into the markdown text directly, it is rendered asinstead of
Redcarpet seems to mistakenly insert one tag as raw text:
The bug seems somehow related to the closing</math>
tag. It does not manifest when I insert a space or line break before it. What is weird (to me) is that the tag in question is further down to the closing tag, and not even adjacent to it.The bug seems somehow related to the caret expression
^2
. Inserting a space in any place after it (that doesn't break HTML syntax) - like immediately after^2
or in between any tag, but before the tag that is treated as raw text (<span class="katex-html" aria-hidden="true">
) restores correct rendering.My workaround is to
gsub
the Katex output and insert the space programmatically, but it'd be nicer if the issue was properly fixed.Any takes / ideas / better workarounds?
Thanks a bunch!
The text was updated successfully, but these errors were encountered: