@@ -117,14 +117,17 @@ test('core', async function (t) {
117
117
'should inject HTML comments between lists and an indented code' ,
118
118
async function ( ) {
119
119
assert . equal (
120
- to ( {
121
- type : 'root' ,
122
- children : [
123
- { type : 'code' , value : 'a' } ,
124
- { type : 'list' , children : [ { type : 'listItem' , children : [ ] } ] } ,
125
- { type : 'code' , value : 'b' }
126
- ]
127
- } ) ,
120
+ to (
121
+ {
122
+ type : 'root' ,
123
+ children : [
124
+ { type : 'code' , value : 'a' } ,
125
+ { type : 'list' , children : [ { type : 'listItem' , children : [ ] } ] } ,
126
+ { type : 'code' , value : 'b' }
127
+ ]
128
+ } ,
129
+ { fences : false }
130
+ ) ,
128
131
' a\n\n*\n\n<!---->\n\n b\n'
129
132
)
130
133
}
@@ -134,13 +137,16 @@ test('core', async function (t) {
134
137
'should inject HTML comments between adjacent indented code' ,
135
138
async function ( ) {
136
139
assert . equal (
137
- to ( {
138
- type : 'root' ,
139
- children : [
140
- { type : 'code' , value : 'a' } ,
141
- { type : 'code' , value : 'b' }
142
- ]
143
- } ) ,
140
+ to (
141
+ {
142
+ type : 'root' ,
143
+ children : [
144
+ { type : 'code' , value : 'a' } ,
145
+ { type : 'code' , value : 'b' }
146
+ ]
147
+ } ,
148
+ { fences : false }
149
+ ) ,
144
150
' a\n\n<!---->\n\n b\n'
145
151
)
146
152
}
@@ -371,10 +377,13 @@ test('blockquote', async function (t) {
371
377
'should support code (flow, indented) in a block quote' ,
372
378
async function ( ) {
373
379
assert . equal (
374
- to ( {
375
- type : 'blockquote' ,
376
- children : [ { type : 'code' , value : 'a\nb\n\nc' } ]
377
- } ) ,
380
+ to (
381
+ {
382
+ type : 'blockquote' ,
383
+ children : [ { type : 'code' , value : 'a\nb\n\nc' } ]
384
+ } ,
385
+ { fences : false }
386
+ ) ,
378
387
'> a\n> b\n>\n> c\n'
379
388
)
380
389
}
@@ -799,14 +808,11 @@ test('code (flow)', async function (t) {
799
808
)
800
809
801
810
await t . test ( 'should support code w/ a value (indent)' , async function ( ) {
802
- assert . equal ( to ( { type : 'code' , value : 'a' } ) , ' a\n' )
811
+ assert . equal ( to ( { type : 'code' , value : 'a' } , { fences : false } ) , ' a\n' )
803
812
} )
804
813
805
814
await t . test ( 'should support code w/ a value (fences)' , async function ( ) {
806
- assert . equal (
807
- to ( { type : 'code' , value : 'a' } , { fences : true } ) ,
808
- '```\na\n```\n'
809
- )
815
+ assert . equal ( to ( { type : 'code' , value : 'a' } ) , '```\na\n```\n' )
810
816
} )
811
817
812
818
await t . test ( 'should support code w/ a lang' , async function ( ) {
@@ -904,7 +910,7 @@ test('code (flow)', async function (t) {
904
910
'should use more grave accents for fences if there are streaks of grave accents in the value (fences)' ,
905
911
async function ( ) {
906
912
assert . equal (
907
- to ( { type : 'code' , value : '```\nasd\n```' } , { fences : true } ) ,
913
+ to ( { type : 'code' , value : '```\nasd\n```' } ) ,
908
914
'````\n```\nasd\n```\n````\n'
909
915
)
910
916
}
@@ -914,7 +920,7 @@ test('code (flow)', async function (t) {
914
920
'should use more tildes for fences if there are streaks of tildes in the value (fences)' ,
915
921
async function ( ) {
916
922
assert . equal (
917
- to ( { type : 'code' , value : '~~~\nasd\n~~~' } , { fence : '~' , fences : true } ) ,
923
+ to ( { type : 'code' , value : '~~~\nasd\n~~~' } , { fence : '~' } ) ,
918
924
'~~~~\n~~~\nasd\n~~~\n~~~~\n'
919
925
)
920
926
}
@@ -963,7 +969,7 @@ test('code (flow)', async function (t) {
963
969
'should use an indent if the value is indented' ,
964
970
async function ( ) {
965
971
assert . equal (
966
- to ( { type : 'code' , value : ' a\n\n b' } ) ,
972
+ to ( { type : 'code' , value : ' a\n\n b' } , { fences : false } ) ,
967
973
' a\n\n b\n'
968
974
)
969
975
}
@@ -4501,7 +4507,7 @@ test('roundtrip', async function (t) {
4501
4507
''
4502
4508
] . join ( '\n' )
4503
4509
4504
- assert . equal ( to ( from ( doc ) ) , doc )
4510
+ assert . equal ( to ( from ( doc ) , { fences : false } ) , doc )
4505
4511
}
4506
4512
)
4507
4513
0 commit comments