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

Spurious warning (UNKNOWN_HTML_TAG_IN_TEMPLATE) for MathML elements #5010

Open
nolanlawson opened this issue Dec 5, 2024 · 0 comments
Open
Labels
bug Up for grabs Issues that are relatively small, self-contained, and ready for implementation

Comments

@nolanlawson
Copy link
Collaborator

Currently we only keep a list of known HTML and SVG elements:

export const KNOWN_HTML_AND_SVG_ELEMENTS = new Set([...HTML_ELEMENTS, ...SVG_ELEMENTS]);

This leads to the template compiler throwing a spurious warning for MathML, e.g.:

<math>
    <mi>π<!-- p --></mi>
    <mo><!-- &InvisibleTimes; --></mo>
    <msup>
      <mi>r</mi>
      <mn>2</mn>
    </msup>
</math>

The warning thrown is:

UNKNOWN_HTML_TAG_IN_TEMPLATE: {
code: 1123,
message:
"Unknown html tag '<{0}>'. For more information refer to https://developer.mozilla.org/en-US/docs/Web/HTML/Element and https://developer.mozilla.org/en-US/docs/Web/SVG/Element",
level: DiagnosticLevel.Warning,
url: '',
},

@nolanlawson nolanlawson added bug Up for grabs Issues that are relatively small, self-contained, and ready for implementation labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Up for grabs Issues that are relatively small, self-contained, and ready for implementation
Projects
None yet
Development

No branches or pull requests

1 participant