@@ -519,7 +519,7 @@ class ContentExample {
519519 '<span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal">λ</span></span></span></span></p>' ,
520520 MathInlineNode (texSource: r'\lambda' , nodes: [
521521 KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
522- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.6944 ), text : null , nodes : [] ),
522+ KatexStrutNode ( heightEm: 0.6944 , verticalAlignEm : null ),
523523 KatexSpanNode (
524524 styles: KatexSpanStyles (
525525 fontFamily: 'KaTeX_Math' ,
@@ -539,7 +539,7 @@ class ContentExample {
539539 '<span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal">λ</span></span></span></span></span></p>' ,
540540 [MathBlockNode (texSource: r'\lambda' , nodes: [
541541 KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
542- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.6944 ), text : null , nodes : [] ),
542+ KatexStrutNode ( heightEm: 0.6944 , verticalAlignEm : null ),
543543 KatexSpanNode (
544544 styles: KatexSpanStyles (
545545 fontFamily: 'KaTeX_Math' ,
@@ -564,7 +564,7 @@ class ContentExample {
564564 '<span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal">b</span></span></span></span></span></p>' , [
565565 MathBlockNode (texSource: 'a' , nodes: [
566566 KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
567- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.4306 ), text : null , nodes : [] ),
567+ KatexStrutNode ( heightEm: 0.4306 , verticalAlignEm : null ),
568568 KatexSpanNode (
569569 styles: KatexSpanStyles (
570570 fontFamily: 'KaTeX_Math' ,
@@ -575,7 +575,7 @@ class ContentExample {
575575 ]),
576576 MathBlockNode (texSource: 'b' , nodes: [
577577 KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
578- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.6944 ), text : null , nodes : [] ),
578+ KatexStrutNode ( heightEm: 0.6944 , verticalAlignEm : null ),
579579 KatexSpanNode (
580580 styles: KatexSpanStyles (
581581 fontFamily: 'KaTeX_Math' ,
@@ -603,7 +603,7 @@ class ContentExample {
603603 [QuotationNode ([
604604 MathBlockNode (texSource: r'\lambda' , nodes: [
605605 KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
606- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.6944 ), text : null , nodes : [] ),
606+ KatexStrutNode ( heightEm: 0.6944 , verticalAlignEm : null ),
607607 KatexSpanNode (
608608 styles: KatexSpanStyles (
609609 fontFamily: 'KaTeX_Math' ,
@@ -632,7 +632,7 @@ class ContentExample {
632632 [QuotationNode ([
633633 MathBlockNode (texSource: 'a' , nodes: [
634634 KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
635- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.4306 ), text : null , nodes : [] ),
635+ KatexStrutNode ( heightEm: 0.4306 , verticalAlignEm : null ),
636636 KatexSpanNode (
637637 styles: KatexSpanStyles (
638638 fontFamily: 'KaTeX_Math' ,
@@ -643,7 +643,7 @@ class ContentExample {
643643 ]),
644644 MathBlockNode (texSource: 'b' , nodes: [
645645 KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
646- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.6944 ), text : null , nodes : [] ),
646+ KatexStrutNode ( heightEm: 0.6944 , verticalAlignEm : null ),
647647 KatexSpanNode (
648648 styles: KatexSpanStyles (
649649 fontFamily: 'KaTeX_Math' ,
@@ -681,7 +681,7 @@ class ContentExample {
681681 ]),
682682 MathBlockNode (texSource: 'a' , nodes: [
683683 KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
684- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.4306 ),text : null , nodes : [] ),
684+ KatexStrutNode ( heightEm: 0.4306 , verticalAlignEm : null ),
685685 KatexSpanNode (
686686 styles: KatexSpanStyles (
687687 fontFamily: 'KaTeX_Math' ,
@@ -731,10 +731,7 @@ class ContentExample {
731731 styles: KatexSpanStyles (),
732732 text: null ,
733733 nodes: [
734- KatexSpanNode (
735- styles: KatexSpanStyles (heightEm: 1.6034 ),
736- text: null ,
737- nodes: []),
734+ KatexStrutNode (heightEm: 1.6034 , verticalAlignEm: null ),
738735 KatexSpanNode (
739736 styles: KatexSpanStyles (fontSizeEm: 2.488 ), // .reset-size6.size11
740737 text: '1' ,
@@ -800,10 +797,7 @@ class ContentExample {
800797 styles: KatexSpanStyles (),
801798 text: null ,
802799 nodes: [
803- KatexSpanNode (
804- styles: KatexSpanStyles (heightEm: 1.6034 ),
805- text: null ,
806- nodes: []),
800+ KatexStrutNode (heightEm: 1.6034 , verticalAlignEm: null ),
807801 KatexSpanNode (
808802 styles: KatexSpanStyles (fontSizeEm: 0.5 ), // reset-size6 size1
809803 text: null ,
@@ -845,10 +839,7 @@ class ContentExample {
845839 styles: KatexSpanStyles (),
846840 text: null ,
847841 nodes: [
848- KatexSpanNode (
849- styles: KatexSpanStyles (heightEm: 3.0 ),
850- text: null ,
851- nodes: []),
842+ KatexStrutNode (heightEm: 3 , verticalAlignEm: - 1.25 ),
852843 KatexSpanNode (
853844 styles: KatexSpanStyles (),
854845 text: '⟨' ,
@@ -1981,10 +1972,7 @@ void main() async {
19811972 testParseExample (ContentExample .mathBlockBetweenImages);
19821973 testParseExample (ContentExample .mathBlockKatexSizing);
19831974 testParseExample (ContentExample .mathBlockKatexNestedSizing);
1984- // TODO: Re-enable this test after adding support for parsing
1985- // `vertical-align` in inline styles. Currently it fails
1986- // because `strut` span has `vertical-align`.
1987- testParseExample (ContentExample .mathBlockKatexDelimSizing, skip: true );
1975+ testParseExample (ContentExample .mathBlockKatexDelimSizing);
19881976
19891977 testParseExample (ContentExample .imageSingle);
19901978 testParseExample (ContentExample .imageSingleNoDimensions);
0 commit comments