Open asterixpound opened 1 year ago
Hi, thanks for reporting the issue. This looks like a bug in mathjax's HTML parser, which I believe can only be fixed by the upstream.
If you only need latex syntax in markdown files, I recommend using tani/markdown-it-mathjax3 instead. It works directly on Markdown sources, so it shouldn't have issue with syntax errors in HTML. It can be added to an eleventy website through the custom mardown-it
instance feature.
Thanks @tsung-ju, I wanted to report the bug upstream but I hesitate to do so without a clear understanding of how the liteDom adaptor is being used or how to bring about the error outside of eleventy.
I appreciate your suggestion of using https://github.com/tani/markdown-it-mathjax3. I will give it a try.
I was trying to use this plugin with eleventy-notes. However, the plugin does not seem to work when there are HTML attributes starting with special characters, as with
:aria-label
or@click
which are used for Alpine and should be valid HTML attributes. Attempting to do so gives the following error:Using the longhand syntax for Alpine, we can replace
:foo
withx-bind:foo
and@bar
withx-on:bar
in which case there are no errors and equations are displayed as expected.See the original discussion at https://github.com/rothsandro/eleventy-notes/issues/37.