mi-tag with mathvariant creates extra spans
Created by: Diaan
I have an mi
-tag with multiple characters in it that I want printed italic. According to the MathML specs I should add the mathvariant
attribute and set it to italic. This works, it prints the contents italic, but it also adds unnecessary span
-tags; all but the first character are in a seperate span
with the font-family
set as a style property.
This causes issues for me because I copy the generated HTML and the extra spans cause issues there.
I found the issue started arising in version 2.4.
I made two codepens, one with version 2.3-latest, which can be found here
And one with 2.7-latest, which can be found here
I've added some css to show the spans in the generated code.
I also added some alternative versions, with mtext
and mo
-tags, also using mathvariant="italic"
, but with those there are no issues.
Is this a feature that can somehow be disabled with a configuration setting or is it a bug?