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