File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
mathjax3-ts/core/MmlTree/MmlNodes Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,10 @@ export class MmlMtable extends AbstractMmlNode {
8484 }
8585 }
8686 display = ! ! ( this . attributes . getExplicit ( 'displaystyle' ) || this . attributes . getDefault ( 'displaystyle' ) ) ;
87- attributes . columnalign = [ this . kind , this . attributes . get ( 'columnalign' ) ] ;
88- attributes . rowalign = [ this . kind , 'center' ] ;
87+ attributes = this . addInheritedAttributes ( attributes , {
88+ columnalign : this . attributes . get ( 'columnalign' ) ,
89+ rowalign : 'center'
90+ } ) ;
8991 const ralign = ( this . attributes . get ( 'rowalign' ) as string )
9092 . replace ( / ^ \s + / , '' ) . replace ( / \s + $ / , '' ) . split ( / + / ) ;
9193 for ( const child of this . childNodes ) {
Original file line number Diff line number Diff line change @@ -64,10 +64,15 @@ export class MmlMtr extends AbstractMmlNode {
6464 . appendChild ( child ) ;
6565 }
6666 }
67- attributes . rowalign = [ this . kind , this . attributes . get ( 'rowalign' ) ] ;
68- attributes . columnalign = [ this . kind , 'center' ] ;
6967 const calign = ( this . attributes . get ( 'columnalign' ) as string )
7068 . replace ( / ^ \s + / , '' ) . replace ( / \s + $ / , '' ) . split ( / + / ) ;
69+ if ( this . arity === 1 ) {
70+ calign . unshift ( this . parent . attributes . get ( 'side' ) as string ) ;
71+ }
72+ attributes = this . addInheritedAttributes ( attributes , {
73+ rowalign : this . attributes . get ( 'rowalign' ) ,
74+ columnalign : 'center'
75+ } ) ;
7176 for ( const child of this . childNodes ) {
7277 attributes . columnalign [ 1 ] = calign . shift ( ) || attributes . columnalign [ 1 ] ;
7378 child . setInheritedAttributes ( attributes , display , level , prime ) ;
You can’t perform that action at this time.
0 commit comments