@@ -181,7 +181,7 @@ export class PrimeItem extends BaseItem {
181181 * @override
182182 */
183183 public checkItem ( item : StackItem ) {
184- let [ top0 , top1 ] = this . TopN ( 2 ) ;
184+ let [ top0 , top1 ] = this . Peek ( 2 ) ;
185185 if ( ! NodeUtil . isType ( top0 , 'msubsup' ) ) {
186186 // @test Prime, Double Prime
187187 const node = this . create ( 'node' , 'msup' , [ top0 , top1 ] ) ;
@@ -224,7 +224,7 @@ export class SubsupItem extends BaseItem {
224224 if ( item . isKind ( 'open' ) || item . isKind ( 'left' ) ) {
225225 return true ;
226226 }
227- const top = this . Top ;
227+ const top = this . First ;
228228 const position = this . getProperty ( 'position' ) as number ;
229229 if ( item . isKind ( 'mml' ) ) {
230230 if ( this . getProperty ( 'primes' ) ) {
@@ -234,11 +234,11 @@ export class SubsupItem extends BaseItem {
234234 } else {
235235 // @test Prime on Prime
236236 NodeUtil . setProperties ( this . getProperty ( 'primes' ) as MmlNode , { variantForm : true } ) ;
237- const node = this . create ( 'node' , 'mrow' , [ this . getProperty ( 'primes' ) as MmlNode , item . Top ] ) ;
238- item . Top = node ;
237+ const node = this . create ( 'node' , 'mrow' , [ this . getProperty ( 'primes' ) as MmlNode , item . First ] ) ;
238+ item . First = node ;
239239 }
240240 }
241- NodeUtil . setChild ( top , position , item . Top ) ;
241+ NodeUtil . setChild ( top , position , item . First ) ;
242242 if ( this . getProperty ( 'movesupsub' ) != null ) {
243243 // @test Limits Subsup (currently does not work! Check again!)
244244 NodeUtil . setProperties ( top , { movesupsub : this . getProperty ( 'movesupsub' ) } as PropertyList ) ;
@@ -567,15 +567,15 @@ export class FnItem extends BaseItem {
567567 * @override
568568 */
569569 public checkItem ( item : StackItem ) {
570- const top = this . Top ;
570+ const top = this . First ;
571571 if ( top ) {
572572 if ( item . isOpen ) {
573573 // @test Fn Stretchy
574574 return true ;
575575 }
576576 if ( ! item . isKind ( 'fn' ) ) {
577577 // @test Named Function
578- let mml = item . Top ;
578+ let mml = item . First ;
579579 if ( ! item . isKind ( 'mml' ) || ! mml ) {
580580 // @test Mathop Super
581581 return [ top , item ] ;
@@ -630,9 +630,9 @@ export class NotItem extends BaseItem {
630630 return true ;
631631 }
632632 if ( item . isKind ( 'mml' ) &&
633- ( NodeUtil . isType ( item . Top , 'mo' ) || NodeUtil . isType ( item . Top , 'mi' ) ||
634- NodeUtil . isType ( item . Top , 'mtext' ) ) ) {
635- mml = item . Top ;
633+ ( NodeUtil . isType ( item . First , 'mo' ) || NodeUtil . isType ( item . First , 'mi' ) ||
634+ NodeUtil . isType ( item . First , 'mtext' ) ) ) {
635+ mml = item . First ;
636636 c = NodeUtil . getText ( mml as TextNode ) ;
637637 if ( c . length === 1 && ! NodeUtil . getProperty ( mml , 'movesupsub' ) &&
638638 NodeUtil . getChildren ( mml ) . length === 1 ) {
@@ -675,7 +675,7 @@ export class DotsItem extends BaseItem {
675675 return true ;
676676 }
677677 let dots = this . getProperty ( 'ldots' ) as MmlNode ;
678- let top = item . Top ;
678+ let top = item . First ;
679679 // @test Operator Dots
680680 if ( item . isKind ( 'mml' ) && NodeUtil . isEmbellished ( top ) ) {
681681 const tclass = NodeUtil . getTexClass ( NodeUtil . getCoreMO ( top ) ) ;
0 commit comments