Skip to content

Fix for empty superscript base#4

Open
orangemug wants to merge 1 commit intofiduswriter:mainfrom
orangemug:fix/empty-superscript-base
Open

Fix for empty superscript base#4
orangemug wants to merge 1 commit intofiduswriter:mainfrom
orangemug:fix/empty-superscript-base

Conversation

@orangemug
Copy link
Copy Markdown

When converting a superscript without a base renders incorrectly in word

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block" class="tml-display" style="display:block math;">
  <msup>
    <mn></mn>
    <mn>4</mn>
  </msup>
</math>

Renders like this

Screenshot 2026-03-22 at 17 14 34

Whereas it should render like this

Screenshot 2026-03-22 at 17 14 38

This is because empty text nodes get rendered as empty boxes

<m:t xml:space="preserve"></m:t>

I've instead replaced that with ZERO WIDTH SPACE (&#x200B;)

<m:t xml:space="preserve">&#x200B;</m:t>

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.

1 participant