File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -840,5 +840,32 @@ test('mdast -> markdown', function (t) {
840840 'should escape a `:` at a break when followed by two colons'
841841 )
842842
843+ t . deepEqual (
844+ toMarkdown (
845+ {
846+ type : 'paragraph' ,
847+ children : [ { type : 'text' , value : ':::\na' } ]
848+ } ,
849+ { extensions : [ directive . toMarkdown ] }
850+ ) ,
851+ '\\:::\na\n' ,
852+ 'should escape a `:` at a break when followed by two colons'
853+ )
854+
855+ t . deepEqual (
856+ toMarkdown (
857+ {
858+ type : 'paragraph' ,
859+ children : [
860+ { type : 'textDirective' , name : 'red' } ,
861+ { type : 'text' , value : ':' }
862+ ]
863+ } ,
864+ { extensions : [ directive . toMarkdown ] }
865+ ) ,
866+ ':red:\n' ,
867+ 'should escape a `:` after a text directive'
868+ )
869+
843870 t . end ( )
844871} )
You can’t perform that action at this time.
0 commit comments