Skip to content

MathML: HTML phrasing children of <mi> are created in MathML namespace #4920

@shanmen-tiny

Description

@shanmen-tiny
  • Check if updating to the latest Preact version resolves the issue

Describe the bug
In JSX under , Preact creates <ins>/<del> inside <mi> in the MathML namespace, so they don’t render. HTML + MathML requires these to be HTML namespace phrasing elements.

To Reproduce
Preact REPL: Preact REPL
JSFiddle: https://jsfiddle.net/3e460jvw/

Expected behavior
Children like <ins>/<del> under <mi> are created in HTML namespace and render.

When the MathML token elements (mi, mo, mn, ms, and mtext) are descendants of HTML elements, they may contain phrasing content elements from the HTML namespace.

Spec: https://html.spec.whatwg.org/multipage/embedded-content-other.html#mathml
https://w3c.github.io/mathml-core/#token-elements

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions