@@ -519,7 +519,7 @@ class ContentExample {
519
519
'<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>' ,
520
520
MathInlineNode (texSource: r'\lambda' , nodes: [
521
521
KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
522
- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.6944 ), text : null , nodes : [] ),
522
+ KatexStrutNode ( heightEm: 0.6944 , verticalAlignEm : null ),
523
523
KatexSpanNode (
524
524
styles: KatexSpanStyles (
525
525
fontFamily: 'KaTeX_Math' ,
@@ -539,7 +539,7 @@ class ContentExample {
539
539
'<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>' ,
540
540
[MathBlockNode (texSource: r'\lambda' , nodes: [
541
541
KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
542
- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.6944 ), text : null , nodes : [] ),
542
+ KatexStrutNode ( heightEm: 0.6944 , verticalAlignEm : null ),
543
543
KatexSpanNode (
544
544
styles: KatexSpanStyles (
545
545
fontFamily: 'KaTeX_Math' ,
@@ -564,7 +564,7 @@ class ContentExample {
564
564
'<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>' , [
565
565
MathBlockNode (texSource: 'a' , nodes: [
566
566
KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
567
- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.4306 ), text : null , nodes : [] ),
567
+ KatexStrutNode ( heightEm: 0.4306 , verticalAlignEm : null ),
568
568
KatexSpanNode (
569
569
styles: KatexSpanStyles (
570
570
fontFamily: 'KaTeX_Math' ,
@@ -575,7 +575,7 @@ class ContentExample {
575
575
]),
576
576
MathBlockNode (texSource: 'b' , nodes: [
577
577
KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
578
- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.6944 ), text : null , nodes : [] ),
578
+ KatexStrutNode ( heightEm: 0.6944 , verticalAlignEm : null ),
579
579
KatexSpanNode (
580
580
styles: KatexSpanStyles (
581
581
fontFamily: 'KaTeX_Math' ,
@@ -603,7 +603,7 @@ class ContentExample {
603
603
[QuotationNode ([
604
604
MathBlockNode (texSource: r'\lambda' , nodes: [
605
605
KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
606
- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.6944 ), text : null , nodes : [] ),
606
+ KatexStrutNode ( heightEm: 0.6944 , verticalAlignEm : null ),
607
607
KatexSpanNode (
608
608
styles: KatexSpanStyles (
609
609
fontFamily: 'KaTeX_Math' ,
@@ -632,7 +632,7 @@ class ContentExample {
632
632
[QuotationNode ([
633
633
MathBlockNode (texSource: 'a' , nodes: [
634
634
KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
635
- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.4306 ), text : null , nodes : [] ),
635
+ KatexStrutNode ( heightEm: 0.4306 , verticalAlignEm : null ),
636
636
KatexSpanNode (
637
637
styles: KatexSpanStyles (
638
638
fontFamily: 'KaTeX_Math' ,
@@ -643,7 +643,7 @@ class ContentExample {
643
643
]),
644
644
MathBlockNode (texSource: 'b' , nodes: [
645
645
KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
646
- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.6944 ), text : null , nodes : [] ),
646
+ KatexStrutNode ( heightEm: 0.6944 , verticalAlignEm : null ),
647
647
KatexSpanNode (
648
648
styles: KatexSpanStyles (
649
649
fontFamily: 'KaTeX_Math' ,
@@ -681,7 +681,7 @@ class ContentExample {
681
681
]),
682
682
MathBlockNode (texSource: 'a' , nodes: [
683
683
KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
684
- KatexSpanNode (styles : KatexSpanStyles ( heightEm: 0.4306 ),text : null , nodes : [] ),
684
+ KatexStrutNode ( heightEm: 0.4306 , verticalAlignEm : null ),
685
685
KatexSpanNode (
686
686
styles: KatexSpanStyles (
687
687
fontFamily: 'KaTeX_Math' ,
@@ -731,10 +731,7 @@ class ContentExample {
731
731
styles: KatexSpanStyles (),
732
732
text: null ,
733
733
nodes: [
734
- KatexSpanNode (
735
- styles: KatexSpanStyles (heightEm: 1.6034 ),
736
- text: null ,
737
- nodes: []),
734
+ KatexStrutNode (heightEm: 1.6034 , verticalAlignEm: null ),
738
735
KatexSpanNode (
739
736
styles: KatexSpanStyles (fontSizeEm: 2.488 ), // .reset-size6.size11
740
737
text: '1' ,
@@ -800,10 +797,7 @@ class ContentExample {
800
797
styles: KatexSpanStyles (),
801
798
text: null ,
802
799
nodes: [
803
- KatexSpanNode (
804
- styles: KatexSpanStyles (heightEm: 1.6034 ),
805
- text: null ,
806
- nodes: []),
800
+ KatexStrutNode (heightEm: 1.6034 , verticalAlignEm: null ),
807
801
KatexSpanNode (
808
802
styles: KatexSpanStyles (fontSizeEm: 0.5 ), // reset-size6 size1
809
803
text: null ,
@@ -845,10 +839,7 @@ class ContentExample {
845
839
styles: KatexSpanStyles (),
846
840
text: null ,
847
841
nodes: [
848
- KatexSpanNode (
849
- styles: KatexSpanStyles (heightEm: 3.0 ),
850
- text: null ,
851
- nodes: []),
842
+ KatexStrutNode (heightEm: 3 , verticalAlignEm: - 1.25 ),
852
843
KatexSpanNode (
853
844
styles: KatexSpanStyles (),
854
845
text: '⟨' ,
@@ -1981,10 +1972,7 @@ void main() async {
1981
1972
testParseExample (ContentExample .mathBlockBetweenImages);
1982
1973
testParseExample (ContentExample .mathBlockKatexSizing);
1983
1974
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);
1988
1976
1989
1977
testParseExample (ContentExample .imageSingle);
1990
1978
testParseExample (ContentExample .imageSingleNoDimensions);
0 commit comments