@@ -943,6 +943,40 @@ class ContentExample {
943943 ]),
944944 ]);
945945
946+ static const mathBlockKatexNulldelimiter = ContentExample (
947+ 'math block; KaTeX nulldelimiter' ,
948+ // https://chat.zulip.org/#narrow/channel/7-test-here/topic/Rajesh/near/2205534
949+ '```math\n\\ left. a \\ middle. b \\ right.\n ```' ,
950+ '<p>'
951+ '<span class="katex-display"><span class="katex">'
952+ '<span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mi>a</mi><mo fence="true" lspace="0.05em" rspace="0.05em">.</mo><mi>b</mi></mrow><annotation encoding="application/x-tex">\\ left. a \\ middle. b \\ right.</annotation></semantics></math></span>'
953+ '<span class="katex-html" aria-hidden="true">'
954+ '<span class="base">'
955+ '<span class="strut" style="height:0.6944em;"></span>'
956+ '<span class="minner">'
957+ '<span class="mopen nulldelimiter"></span>'
958+ '<span class="mord mathnormal">a</span>'
959+ '<span class="nulldelimiter"></span>'
960+ '<span class="mord mathnormal">b</span>'
961+ '<span class="mclose nulldelimiter"></span></span></span></span></span></span></p>' , [
962+ MathBlockNode (texSource: '\\ left. a \\ middle. b \\ right.' , nodes: [
963+ KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
964+ KatexStrutNode (heightEm: 0.6944 , verticalAlignEm: null ),
965+ KatexSpanNode (styles: KatexSpanStyles (), text: null , nodes: [
966+ KatexSpanNode (styles: KatexSpanStyles (widthEm: 0.12 ), text: null , nodes: []),
967+ KatexSpanNode (
968+ styles: KatexSpanStyles (fontFamily: 'KaTeX_Math' , fontStyle: KatexSpanFontStyle .italic),
969+ text: 'a' , nodes: null ),
970+ KatexSpanNode (styles: KatexSpanStyles (widthEm: 0.12 ), text: null , nodes: []),
971+ KatexSpanNode (
972+ styles: KatexSpanStyles (fontFamily: 'KaTeX_Math' , fontStyle: KatexSpanFontStyle .italic),
973+ text: 'b' , nodes: null ),
974+ KatexSpanNode (styles: KatexSpanStyles (widthEm: 0.12 ), text: null , nodes: []),
975+ ]),
976+ ]),
977+ ]),
978+ ]);
979+
946980 static const imageSingle = ContentExample (
947981 'single image' ,
948982 // https://chat.zulip.org/#narrow/stream/7-test-here/topic/Thumbnails/near/1900103
@@ -2033,6 +2067,7 @@ void main() async {
20332067 testParseExample (ContentExample .mathBlockKatexNestedSizing);
20342068 testParseExample (ContentExample .mathBlockKatexDelimSizing);
20352069 testParseExample (ContentExample .mathBlockKatexSpace);
2070+ testParseExample (ContentExample .mathBlockKatexNulldelimiter);
20362071
20372072 testParseExample (ContentExample .imageSingle);
20382073 testParseExample (ContentExample .imageSingleNoDimensions);
0 commit comments