summaryrefslogtreecommitdiffstats
path: root/packages/markdown/marked/test/new/cm_links.html
blob: 08c65e7cddcd27fcde1d796121f16e09288541c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
<h1 id="links">Links</h1>

<h3 id="example-459">Example 459</h3>

<p><a href="/uri" title="title">link</a></p>

<h3 id="example-460">Example 460</h3>

<p><a href="/uri">link</a></p>

<h3 id="example-461">Example 461</h3>

<p><a href="">link</a></p>

<h3 id="example-462">Example 462</h3>

<p><a href="">link</a></p>

<h3 id="example-463">Example 463</h3>

<p>[link](/my uri)</p>

<h3 id="example-464">Example 464</h3>

<p>[link](&lt;/my uri&gt;)</p>

<h3 id="example-465">Example 465</h3>

<p>[link](foo
bar)</p>

<h3 id="example-466">Example 466</h3>

<p>[link](<foo
bar>)</p>

<h3 id="example-467">Example 467</h3>

<p><a href="(foo)">link</a></p>

<h3 id="example-4680">Example 4680</h3>

<p>ONE LEVEL of parentheses are allowed without escaping, as long as they are balanced:</p>

<p><a href="foo(bar)">link</a></p>

<h3 id="example-469">Example 469</h3>

<p><a href="foo(and(bar)">link</a></p>

<h3 id="example-470">Example 470</h3>

<p>However, if you have ANY unbalanced parentheses, you need to escape or use the &lt;...&gt; form:</p>

<p><a href="foo(and(bar)">link</a></p>

<h3 id="example-471">Example 471</h3>

<p><a href="foo):">link</a></p>

<h3 id="example-472">Example 472</h3>

<p><a href="#fragment">link</a></p>
<p><a href="http://example.com#fragment">link</a></p>
<p><a href="http://example.com?foo=3#frag">link</a></p>

<h3 id="example-473">Example 473</h3>

<p><a href="foo%5Cbar">link</a></p>

<h3 id="example-4740">Example 4740</h3>

<p><a href="foo%20b&auml;">link</a></p>

<h3 id="example-475">Example 475</h3>

<p><a href="%22title%22">link</a></p>

<h3 id="example-476">Example 476</h3>

<p><a href="/url" title="title">link</a>
<a href="/url" title="title">link</a>
<a href="/url" title="title">link</a></p>

<h3 id="example-477">Example 477</h3>

<p><a href="/url" title="title &quot;&quot;">link</a></p>

<h3 id="example-479">Example 479</h3>

<p>[link](/url &quot;title &quot;and&quot; title&quot;)</p>

<h3 id="example-480">Example 480</h3>

<p><a href="/url" title="title &quot;and&quot; title">link</a></p>

<h3 id="example-481">Example 481</h3>

<p><a href="/uri" title="title">link</a></p>

<h3 id="example-482">Example 482</h3>

<p>[link] (/uri)</p>

<h3 id="example-4830">Example 4830</h3>

<p>The link text may contain ONE LEVEL of balanced brackets, but not unbalanced ones, unless they are escaped:</p>

<p><a href="/uri">link [foo4830]</a></p>

<h3 id="example-484">Example 484</h3>

<p>[link] bar](/uri)</p>

<h3 id="example-485">Example 485</h3>

<p>[link <a href="/uri">bar</a></p>

<h3 id="example-486">Example 486</h3>

<p><a href="/uri">link [bar</a></p>

<h3 id="example-487">Example 487</h3>

<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>

<h3 id="example-488">Example 488</h3>

<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p>

<h3 id="example-493">Example 493</h3>

<p><a href="baz*">foo *bar</a></p>

<h3 id="example-494">Example 494</h3>

<p><em>foo [bar</em> baz]</p>

<h3 id="example-498">Example 498</h3>

<p><a href="/url" title="title">foo</a></p>

<h3 id="example-4990">Example 4990</h3>

<p><a href="/uri">link [foo499]</a></p>

<h3 id="example-500">Example 500</h3>

<p><a href="/uri">link [bar</a></p>

<h3 id="example-501">Example 501</h3>

<p><a href="/uri">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>

<h3 id="example-502">Example 502</h3>

<p><a href="/uri"><img src="moon.jpg" alt="moon" /></a></p>

<h3 id="example-5030">Example 5030</h3>

<p><a href="/uri">foo <a href="/uri">bar</a></a></p>

<h3 id="example-504">Example 504</h3>

<p><a href="/uri">foo <em>bar <a href="/uri">baz</a></em></a></p>

<h3 id="example-506">Example 506</h3>

<p><a href="/uri">foo *bar</a></p>

<h3 id="example-510">Example 510</h3>

<p><a href="/url" title="title">foo</a></p>

<h3 id="example-511">Example 511</h3>

<p><a href="/url">Толпой</a> is a Russian word.</p>

<h3 id="example-512">Example 512</h3>

<p><a href="/url">Baz</a></p>

<h3 id="example-513">Example 513</h3>

<p>[foo513] <a href="/url" title="title">bar513</a></p>

<h3 id="example-514">Example 514</h3>

<p>[foo514]
<a href="/url" title="title">bar514</a></p>

<h3 id="example-515">Example 515</h3>

<p><a href="/url1">bar</a></p>

<h3 id="example-516">Example 516</h3>

<p>[bar][foo!516]</p>

<h3 id="example-517">Example 517</h3>

<p>[foo517][ref[517]</p>
<p>[ref[517]: /uri</p>

<h3 id="example-518">Example 518</h3>

<p>[foo518][ref[bar518]518]</p>
<p>[ref[bar518]518]: /uri</p>

<h3 id="example-519">Example 519</h3>

<p>[[[foo519]]]</p>
<p>[[[foo519]]]: /url</p>

<h3 id="example-520">Example 520</h3>

<p><a href="/uri">foo</a></p>

<h3 id="example-521">Example 521</h3>

<p><a href="/uri">bar\</a></p>

<h3 id="example-522">Example 522</h3>

<p>[]</p>
<p>[]: /uri</p>

<h3 id="example-523">Example 523</h3>

<p>[
 ]</p>
<p>[
 ]: /uri</p>

<h3 id="example-524">Example 524</h3>

<p><a href="/url" title="title">foo</a></p>

<h3 id="example-525">Example 525</h3>

<p><a href="/url" title="title"><em>foo</em> bar</a></p>

<h3 id="example-526">Example 526</h3>

<p><a href="/url" title="title">Foo</a></p>

<h3 id="example-527">Example 527</h3>

<p><a href="/url" title="title">foo</a>
[]</p>

<h3 id="example-528">Example 528</h3>

<p><a href="/url" title="title">foo</a></p>

<h3 id="example-529">Example 529</h3>

<p><a href="/url" title="title"><em>foo</em> bar</a></p>

<h3 id="example-530">Example 530</h3>

<p>[<a href="/url" title="title"><em>foo</em> bar</a>]</p>

<h3 id="example-531">Example 531</h3>

<p>[[bar <a href="/url">foo531</a></p>

<h3 id="example-532">Example 532</h3>

<p><a href="/url" title="title">Foo</a></p>

<h3 id="example-533">Example 533</h3>

<p><a href="/url">foo533</a> bar</p>

<h3 id="example-534">Example 534</h3>

<p>[foo]</p>

<h3 id="example-536">Example 536</h3>

<p><a href="/url2">foo536</a></p>

<h3 id="example-537">Example 537</h3>

<p><a href="/url1">foo537</a></p>

<h3 id="example-538">Example 538</h3>

<p><a href="">foo538</a></p>

<h3 id="example-539">Example 539</h3>

<p><a href="/url1">foo539</a>(not a link)</p>

<h3 id="example-540">Example 540</h3>

<p>[foo540]<a href="/url">bar540</a></p>

<h3 id="example-541">Example 541</h3>

<p><a href="/url2">foo541</a><a href="/url1">baz541</a></p>

<h3 id="example-542">Example 542</h3>

<p>[foo542]<a href="/url1">bar542</a></p>

<h3 id="example-543">Example 543</h3>

<p><img src="/url" alt="foo543" title="title" /></p>

<h3 id="example-5440">Example 5440</h3>

<p><img src="train.jpg" alt="foo *bar*544" title="train &amp; tracks" /></p>

<h3 id="example-5450">Example 5450</h3>

<p><img src="/url2" alt="foo ![bar](/url)" /></p>

<h3 id="example-5460">Example 5460</h3>

<p><img src="/url2" alt="foo [bar](/url)" /></p>

<h3 id="example-5470">Example 5470</h3>

<p><img src="train.jpg" alt="foo *bar*547" title="train &amp; tracks" /></p>

<h3 id="example-5480">Example 5480</h3>

<p><img src="train.jpg" alt="foo *bar*" title="train &amp; tracks" /></p>

<h3 id="example-549">Example 549</h3>

<p><img src="train.jpg" alt="foo" /></p>

<h3 id="example-550">Example 550</h3>

<p>My <img src="/path/to/train.jpg" alt="foo bar" title="title" /></p>

<h3 id="example-551">Example 551</h3>

<p><img src="url" alt="foo" /></p>

<h3 id="example-552">Example 552</h3>

<p><img src="/url" alt="" /></p>

<h3 id="example-553">Example 553</h3>

<p><img src="/url" alt="foo" /></p>

<h3 id="example-554">Example 554</h3>

<p><img src="/url" alt="foo" /></p>

<h3 id="example-555">Example 555</h3>

<p><img src="/url" alt="foo" title="title" /></p>

<h3 id="example-5560">Example 5560</h3>

<p><img src="/url" alt="*foo* bar" title="title" /></p>

<h3 id="example-557">Example 557</h3>

<p><img src="/url" alt="Foo" title="title" /></p>

<h3 id="example-558">Example 558</h3>

<p><img src="/url" alt="foo" title="title" />
[]</p>

<h3 id="example-559">Example 559</h3>

<p><img src="/url" alt="foo" title="title" /></p>

<h3 id="example-5600">Example 5600</h3>

<p><img src="/url" alt="*foo* bar" title="title" /></p>

<h3 id="example-561">Example 561</h3>

<p>![[foo561]]</p>
<p>[[foo561]]: /url &quot;title&quot;</p>

<h3 id="example-562">Example 562</h3>

<p><img src="/url" alt="Foo" title="title" /></p>

<h3 id="example-563">Example 563</h3>

<p>![foo]</p>

<h3 id="example-564">Example 564</h3>

<p>!<a href="/url" title="title">foo</a></p>