Skip to content

Spurious warning (UNKNOWN_HTML_TAG_IN_TEMPLATE) for MathML elements #5010

Open
@nolanlawson

Description

@nolanlawson

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: '',
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    Up for grabsIssues that are relatively small, self-contained, and ready for implementationbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions