Skip to content

Commit ea94de0

Browse files
committed
Don't create an mmultiscripts from an msub/msup with an empty base if there are no other children to with the script can be attached.
1 parent 5239fb0 commit ea94de0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/canonicalize.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2772,6 +2772,9 @@ impl CanonicalizeContext {
27722772
}
27732773

27742774
fn handle_convert_to_mmultiscripts(children: &mut Vec<ChildOfElement>) {
2775+
if children.len() == 1 {
2776+
return; // can't convert to mmultiscripts if there is nothing to attach an empty base to
2777+
}
27752778
let mut i = 0;
27762779
// convert_to_mmultiscripts changes 'children', so can't cache length
27772780
while i < children.len() {

0 commit comments

Comments
 (0)