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

MathML and SVG tags considered non-native by parser #258

Open
JakeIsMeh opened this issue Sep 22, 2024 · 0 comments
Open

MathML and SVG tags considered non-native by parser #258

JakeIsMeh opened this issue Sep 22, 2024 · 0 comments

Comments

@JakeIsMeh
Copy link

JakeIsMeh commented Sep 22, 2024

For a while, I've been getting Vue warnings about failure to resolve MathML tags during rendering with MDC. Initially I tried to set compilerOptions.isCustomElement to suppress the warnings but it seemed ignored when used with MDC (#250).

Vue added support for MathML tags all the way back in 3.4, and Katex's output seemed to be correct, so it has to come from MDC.

It seems to come from here:

// Check if node is not a native HTML tag
if (!htmlTags.includes(component) && !component?.render && !component?.ssrRender) {
const componentFn = resolveComponent(pascalCase(component), false)

due to MathML tags not being included in htmlTags, thus the component tries to resolve it as a Vue component.

I'm willing to create a PR if all it requires is adding the MathML tags to runtime/parser/utils/html-tags-list.ts.

EDIT: this also affects the <line> and <path> tags used by inline SVGs

@JakeIsMeh JakeIsMeh changed the title MathML tags considered non-native by parser MathML and SVG tags considered non-native by parser Sep 22, 2024
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