@@ -136,79 +136,61 @@ test('mdast -> markdown', function (t) {
136
136
} ,
137
137
{ extensions : [ autolinkLiterals . toMarkdown ] }
138
138
) ,
139
-
139
+
140
140
'should not serialize autolink literals'
141
141
)
142
142
143
143
t . deepEqual (
144
144
toMarkdown (
145
- {
146
- type : 'paragraph' ,
147
- children :
[ { type :
'text' , value :
'a [email protected] ' } ]
148
- } ,
145
+ { type :
'paragraph' , children :
[ { type :
'text' , value :
'a [email protected] ' } ] } ,
149
146
{ extensions : [ autolinkLiterals . toMarkdown ] }
150
147
) ,
151
- 'a b\\@c.d' ,
148
+ 'a b\\@c.d\n ' ,
152
149
'should escape at signs if they appear in what looks like an email'
153
150
)
154
151
155
152
t . deepEqual (
156
153
toMarkdown (
157
- {
158
- type : 'paragraph' ,
159
- children : [ { type : 'text' , value : 'a @c' } ]
160
- } ,
154
+ { type : 'paragraph' , children : [ { type : 'text' , value : 'a @c' } ] } ,
161
155
{ extensions : [ autolinkLiterals . toMarkdown ] }
162
156
) ,
163
- 'a @c' ,
157
+ 'a @c\n ' ,
164
158
'should not escape at signs if they appear in what can’t be an email'
165
159
)
166
160
167
161
t . deepEqual (
168
162
toMarkdown (
169
- {
170
- type : 'paragraph' ,
171
- children : [ { type : 'text' , value : 'a www.b.c' } ]
172
- } ,
163
+ { type : 'paragraph' , children : [ { type : 'text' , value : 'a www.b.c' } ] } ,
173
164
{ extensions : [ autolinkLiterals . toMarkdown ] }
174
165
) ,
175
- 'a www\\.b.c' ,
166
+ 'a www\\.b.c\n ' ,
176
167
'should escape dots if they appear in what looks like a domain'
177
168
)
178
169
179
170
t . deepEqual (
180
171
toMarkdown (
181
- {
182
- type : 'paragraph' ,
183
- children : [ { type : 'text' , value : 'a.b' } ]
184
- } ,
172
+ { type : 'paragraph' , children : [ { type : 'text' , value : 'a.b' } ] } ,
185
173
{ extensions : [ autolinkLiterals . toMarkdown ] }
186
174
) ,
187
- 'a.b' ,
175
+ 'a.b\n ' ,
188
176
'should not escape dots if they appear in what can’t be a domain'
189
177
)
190
178
191
179
t . deepEqual (
192
180
toMarkdown (
193
- {
194
- type : 'paragraph' ,
195
- children : [ { type : 'text' , value : 'https:/' } ]
196
- } ,
181
+ { type : 'paragraph' , children : [ { type : 'text' , value : 'https:/' } ] } ,
197
182
{ extensions : [ autolinkLiterals . toMarkdown ] }
198
183
) ,
199
- 'https\\:/' ,
184
+ 'https\\:/\n ' ,
200
185
'should escape colons if they appear in what looks like a http protocol'
201
186
)
202
187
203
188
t . deepEqual (
204
189
toMarkdown (
205
- {
206
- type : 'paragraph' ,
207
- children : [ { type : 'text' , value : 'https:a' } ]
208
- } ,
190
+ { type : 'paragraph' , children : [ { type : 'text' , value : 'https:a' } ] } ,
209
191
{ extensions : [ autolinkLiterals . toMarkdown ] }
210
192
) ,
211
- 'https:a' ,
193
+ 'https:a\n ' ,
212
194
'should not escape colons if they appear in what can’t be a http protocol'
213
195
)
214
196
0 commit comments