fix(mathml): render a script without a base over an empty base

This commit is contained in:
2026-09-28 15:03:10 +02:00
parent 2913aa4eb0
commit 7a062a6f54
3 changed files with 13 additions and 0 deletions
+6
View File
@@ -128,6 +128,12 @@ func (p *parser) atom() *node {
return nil
}
return p.scripts(n)
case tokCaret, tokUnderscore:
// A script without a base, the isotope notation of ^3He, takes
// an empty base: the script renders over nothing, the way the
// notation is printed, and degrading it would refuse notation
// the mathematics carries.
return p.scripts(el("mrow"))
}
p.pos++
return errorNode(t.text)