@@ -318,18 +318,14 @@ test('mdast -> markdown', (t) => {
318
318
children : [
319
319
{ type : 'tableCell' , children : [ { type : 'text' , value : 'a' } ] } ,
320
320
{ type : 'tableCell' , children : [ { type : 'text' , value : '古' } ] } ,
321
- {
322
- type : 'tableCell' ,
323
- children : [ { type : 'text' , value : '\u001B[1m古\u001B[22m' } ]
324
- } ,
325
321
{ type : 'tableCell' , children : [ { type : 'text' , value : '🤔' } ] }
326
322
]
327
323
}
328
324
]
329
325
} ,
330
326
{ extensions : [ gfmTableToMarkdown ( { stringLength : stringWidth } ) ] }
331
327
) ,
332
- '| a | 古 | \u001B[1m古\u001B[22m | 🤔 |\n| - | - - | -- | -- |\n' ,
328
+ '| a | 古 | 🤔 |\n| - | -- | -- |\n' ,
333
329
'should support `stringLength`'
334
330
)
335
331
@@ -414,6 +410,22 @@ test('mdast -> markdown', (t) => {
414
410
'should escape eols in a table cell'
415
411
)
416
412
413
+ t . deepEqual (
414
+ toMarkdown (
415
+ {
416
+ type : 'tableRow' ,
417
+ children : [
418
+ { type : 'tableCell' , children : [ { type : 'text' , value : '<a>' } ] } ,
419
+ { type : 'tableCell' , children : [ { type : 'text' , value : '*a' } ] } ,
420
+ { type : 'tableCell' , children : [ { type : 'text' , value : '![]()' } ] }
421
+ ]
422
+ } ,
423
+ { extensions : [ gfmTableToMarkdown ( ) ] }
424
+ ) ,
425
+ '| \\<a> | \\*a | !\\[]\\() |\n' ,
426
+ 'should escape phrasing characters in table cells'
427
+ )
428
+
417
429
t . deepEqual (
418
430
toMarkdown (
419
431
{ type : 'tableCell' , children : [ { type : 'text' , value : 'a|b' } ] } ,
0 commit comments