Skip to content

fix(math): keep empty MathML descendants - #416

Open
RovshanMuradov wants to merge 1 commit into
kepano:mainfrom
RovshanMuradov:fix/preserve-empty-mathml
Open

RovshanMuradov wants to merge 1 commit into
kepano:mainfrom
RovshanMuradov:fix/preserve-empty-mathml

Conversation

@RovshanMuradov

@RovshanMuradov RovshanMuradov commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #415

removeEmptyElements dropped empty MathML descendants such as the empty base in <msub><mrow></mrow><mi>k</mi></msub>, breaking argument structure. Empty elements inside <math> are now kept; an empty <math> root is still removed unless it has data-latex.

<!-- before -->
<msub><mi>k</mi></msub>
<!-- after -->
<msub><mrow></mrow><mi>k</mi></msub>

removeEmptyElements dropped empty MathML nodes such as the empty base
in <msub><mrow></mrow><mi>k</mi></msub>, breaking argument structure.
Keep empty elements inside <math>; an empty root is still removed
unless it has data-latex.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

Empty-element cleanup removes structural MathML descendants

1 participant