@@ -1045,6 +1045,42 @@ test('heading', function (t) {
10451045 'should serialize a with a closing sequence when `closeAtx` (content)'
10461046 )
10471047
1048+ t . equal (
1049+ to ( { type : 'heading' , depth : 2 , children : [ { type : 'text' , value : '# a' } ] } ) ,
1050+ '## # a\n' ,
1051+ 'should not escape a `#` at the start of phrasing in a heading'
1052+ )
1053+
1054+ t . equal (
1055+ to ( { type : 'heading' , depth : 2 , children : [ { type : 'text' , value : '1) a' } ] } ) ,
1056+ '## 1) a\n' ,
1057+ 'should not escape a `1)` at the start of phrasing in a heading'
1058+ )
1059+
1060+ t . equal (
1061+ to ( { type : 'heading' , depth : 2 , children : [ { type : 'text' , value : '+ a' } ] } ) ,
1062+ '## + a\n' ,
1063+ 'should not escape a `+` at the start of phrasing in a heading'
1064+ )
1065+
1066+ t . equal (
1067+ to ( { type : 'heading' , depth : 2 , children : [ { type : 'text' , value : '- a' } ] } ) ,
1068+ '## - a\n' ,
1069+ 'should not escape a `-` at the start of phrasing in a heading'
1070+ )
1071+
1072+ t . equal (
1073+ to ( { type : 'heading' , depth : 2 , children : [ { type : 'text' , value : '= a' } ] } ) ,
1074+ '## = a\n' ,
1075+ 'should not escape a `=` at the start of phrasing in a heading'
1076+ )
1077+
1078+ t . equal (
1079+ to ( { type : 'heading' , depth : 2 , children : [ { type : 'text' , value : '> a' } ] } ) ,
1080+ '## > a\n' ,
1081+ 'should not escape a `>` at the start of phrasing in a heading'
1082+ )
1083+
10481084 t . end ( )
10491085} )
10501086
0 commit comments