@@ -2524,10 +2524,10 @@ def subsuper(self, s: str, loc: int, toks: ParseResults) -> T.Any:
2524
2524
if len (new_children ):
2525
2525
# remove last kern
2526
2526
if (isinstance (new_children [- 1 ], Kern ) and
2527
- hasattr (new_children [- 2 ], '_metrics' )):
2527
+ isinstance (new_children [- 2 ], Char )):
2528
2528
new_children = new_children [:- 1 ]
2529
2529
last_char = new_children [- 1 ]
2530
- if hasattr (last_char , '_metrics' ):
2530
+ if isinstance (last_char , Char ):
2531
2531
last_char .width = last_char ._metrics .advance
2532
2532
# create new Hlist without kerning
2533
2533
nucleus = Hlist (new_children , do_kern = False )
@@ -2603,7 +2603,7 @@ def subsuper(self, s: str, loc: int, toks: ParseResults) -> T.Any:
2603
2603
2604
2604
# Do we need to add a space after the nucleus?
2605
2605
# To find out, check the flag set by operatorname
2606
- spaced_nucleus = [nucleus , x ]
2606
+ spaced_nucleus : list [ Node ] = [nucleus , x ]
2607
2607
if self ._in_subscript_or_superscript :
2608
2608
spaced_nucleus += [self ._make_space (self ._space_widths [r'\,' ])]
2609
2609
self ._in_subscript_or_superscript = False
0 commit comments