Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lost closing tags when used with KaTeX #181

Open
D-Sketon opened this issue Feb 20, 2024 · 0 comments
Open

Lost closing tags when used with KaTeX #181

D-Sketon opened this issue Feb 20, 2024 · 0 comments

Comments

@D-Sketon
Copy link

I tried to use minify-html in html containing KaTeX, but the closing tags are lost after compression, resulting in rendering error
Since KaTeX generates MathML, does minify-html support MathML? Or do I need to do any other configurations?
Here is the reproduction code

const { minify } = require("@minify-html/node");
const str = `
<mrow>
  <mspace width="2em"/>
</mrow>
`;
const res = minify(Buffer.from(str), {
  keep_spaces_between_attributes: true,
  keep_comments: true
}).toString()
console.log(res);

The output is: <mrow> <mspace width=2em>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant