Debian Codegraph @

tests/languages/asciidoc/inline_feature.test

raw
1 _emphasis_
2 ``double quotes''
3 `single quotes'
4 `monospace`
5 'emphasis'
6 *strong*
7 +monospace+
8 #unquoted#
9
10 _foo _ bar baz_
11 `foo ' bar baz'
12 `foo ` bar baz`
13 'foo ' bar baz'
14 *foo * bar baz*
15 +foo + bar baz+
16 #foo # bar baz#
17
18 _foo
19 bar_
20 ``foo
21 bar''
22 `foo
23 bar'
24 `foo
25 bar`
26 'foo
27 bar'
28 *foo
29 bar*
30 +foo
31 bar+
32 #foo
33 bar#
34
35 foo__emphasis__bar
36 foo**strong**bar
37 foo++monospace++bar
38 foo+++passthrough+++bar
39 foo##unquoted##bar
40 foo$$passthrough$$bar
41 foo~subscript~bar
42 foo^superscript^bar
43 foo{attribute-reference}bar
44 foo[[anchor]]bar
45 foo[[[bibliography anchor]]]bar
46 foo<<xref>>bar
47 foo(((indexes)))bar
48 foo((indexes))bar
49
50 ====
51 _emphasis_
52 ``double quotes''
53 `single quotes'
54 `monospace`
55 'emphasis'
56 *strong*
57 +monospace+
58 #unquoted#
59 __emphasis__
60 **strong**
61 ++monospace++
62 +++passthrough+++
63 ##unquoted##
64 $$passthrough$$
65 ~subscript~
66 ^superscript^
67 {attribute-reference}
68 [[anchor]]
69 [[[bibliography anchor]]]
70 <<xref>>
71 (((indexes)))
72 ((indexes))
73 ====
74
75 |====
76 |
77 _emphasis_
78 ``double quotes''
79 `single quotes'
80 `monospace`
81 'emphasis'
82 *strong*
83 +monospace+
84 #unquoted#
85 __emphasis__
86 **strong**
87 ++monospace++
88 +++passthrough+++
89 ##unquoted##
90 $$passthrough$$
91 ~subscript~
92 ^superscript^
93 {attribute-reference}
94 [[anchor]]
95 [[[bibliography anchor]]]
96 <<xref>>
97 (((indexes)))
98 ((indexes))
99 |====
100
101 ['foo *bar* baz']
102
103 == foo *bar* baz ==
104
105 {names=value}
106 {names?value}
107 {names!value}
108 {names#value}
109 {names%value}
110 {names@regexp:value1:value2}
111 {names$regexp:value1:value2}
112 {names$regexp::value}
113 {foo,bar=foobar}
114 {foo+bar=foobar}
115 {counter:attrname}
116
117 ----------------------------------------------------
118
119 [
120 ["inline", [
121 ["italic", [["punctuation", "_"], "emphasis", ["punctuation", "_"]]]
122 ]],
123 ["inline", [
124 ["punctuation", "``"], "double quotes", ["punctuation", "''"]
125 ]],
126 ["inline", [
127 ["punctuation", "`"], "single quotes", ["punctuation", "'"]
128 ]],
129 ["inline", [
130 ["punctuation", "`"], "monospace", ["punctuation", "`"]
131 ]],
132 ["inline", [
133 ["italic", [["punctuation", "'"], "emphasis", ["punctuation", "'"]]]
134 ]],
135 ["inline", [
136 ["bold", [["punctuation", "*"], "strong", ["punctuation", "*"]]]
137 ]],
138 ["inline", [
139 ["punctuation", "+"], "monospace", ["punctuation", "+"]
140 ]],
141 ["inline", [
142 ["punctuation", "#"], "unquoted", ["punctuation", "#"]
143 ]],
144
145 ["inline", [
146 ["italic", [["punctuation", "_"], "foo _ bar baz", ["punctuation", "_"]]]
147 ]],
148 ["inline", [
149 ["punctuation", "`"], "foo ' bar baz", ["punctuation", "'"]
150 ]],
151 ["inline", [
152 ["punctuation", "`"], "foo ` bar baz", ["punctuation", "`"]
153 ]],
154 ["inline", [
155 ["italic", [["punctuation", "'"], "foo ' bar baz", ["punctuation", "'"]]]
156 ]],
157 ["inline", [
158 ["bold", [["punctuation", "*"], "foo * bar baz", ["punctuation", "*"]]]
159 ]],
160 ["inline", [
161 ["punctuation", "+"], "foo + bar baz", ["punctuation", "+"]
162 ]],
163 ["inline", [
164 ["punctuation", "#"], "foo # bar baz", ["punctuation", "#"]
165 ]],
166
167 ["inline", [
168 ["italic", [["punctuation", "_"], "foo\r\nbar", ["punctuation", "_"]]]
169 ]],
170 ["inline", [
171 ["punctuation", "``"], "foo\r\nbar", ["punctuation", "''"]
172 ]],
173 ["inline", [
174 ["punctuation", "`"], "foo\r\nbar", ["punctuation", "'"]
175 ]],
176 ["inline", [
177 ["punctuation", "`"], "foo\r\nbar", ["punctuation", "`"]
178 ]],
179 ["inline", [
180 ["italic", [["punctuation", "'"], "foo\r\nbar", ["punctuation", "'"]]]
181 ]],
182 ["inline", [
183 ["bold", [["punctuation", "*"], "foo\r\nbar", ["punctuation", "*"]]]
184 ]],
185 ["inline", [
186 ["punctuation", "+"], "foo\r\nbar", ["punctuation", "+"]
187 ]],
188 ["inline", [
189 ["punctuation", "#"], "foo\r\nbar", ["punctuation", "#"]
190 ]],
191
192 "\r\n\r\nfoo",
193 ["inline", [
194 ["italic", [["punctuation", "__"], "emphasis", ["punctuation", "__"]]]
195 ]],
196 "bar\r\nfoo",
197 ["inline", [
198 ["bold", [["punctuation", "**"], "strong", ["punctuation", "**"]]]
199 ]],
200 "bar\r\nfoo",
201 ["inline", [
202 ["punctuation", "++"], "monospace", ["punctuation", "++"]
203 ]],
204 "bar\r\nfoo",
205 ["inline", [
206 ["punctuation", "+++"], "passthrough", ["punctuation", "+++"]
207 ]],
208 "bar\r\nfoo",
209 ["inline", [
210 ["punctuation", "##"], "unquoted", ["punctuation", "##"]
211 ]],
212 "bar\r\nfoo",
213 ["inline", [
214 ["punctuation", "$$"], "passthrough", ["punctuation", "$$"]
215 ]],
216 "bar\r\nfoo",
217 ["inline", [
218 ["punctuation", "~"], "subscript", ["punctuation", "~"]
219 ]],
220 "bar\r\nfoo",
221 ["inline", [
222 ["punctuation", "^"], "superscript", ["punctuation", "^"]
223 ]],
224 "bar\r\nfoo",
225 ["inline", [
226 ["attribute-ref", [["punctuation", "{"], ["variable", "attribute-reference"], ["punctuation", "}"]]]
227 ]],
228 "bar\r\nfoo",
229 ["inline", [
230 ["url", [["punctuation", "[["], "anchor", ["punctuation", "]]"]]]
231 ]],
232 "bar\r\nfoo",
233 ["inline", [
234 ["url", [["punctuation", "[[["], "bibliography anchor", ["punctuation", "]]]"]]]
235 ]],
236 "bar\r\nfoo",
237 ["inline", [
238 ["url", [["punctuation", "<<"], "xref", ["punctuation", ">>"]]]
239 ]],
240 "bar\r\nfoo",
241 ["inline", [
242 ["punctuation", "((("], "indexes", ["punctuation", ")))"]
243 ]],
244 "bar\r\nfoo",
245 ["inline", [
246 ["punctuation", "(("], "indexes", ["punctuation", "))"]
247 ]],
248 "bar\r\n\r\n",
249
250 ["other-block", [
251 ["punctuation", "===="],
252
253 ["inline", [
254 ["italic", [["punctuation", "_"], "emphasis", ["punctuation", "_"]]]
255 ]],
256 ["inline", [
257 ["punctuation", "``"], "double quotes", ["punctuation", "''"]
258 ]],
259 ["inline", [
260 ["punctuation", "`"], "single quotes", ["punctuation", "'"]
261 ]],
262 ["inline", [
263 ["punctuation", "`"], "monospace", ["punctuation", "`"]
264 ]],
265 ["inline", [
266 ["italic", [["punctuation", "'"], "emphasis", ["punctuation", "'"]]]
267 ]],
268 ["inline", [
269 ["bold", [["punctuation", "*"], "strong", ["punctuation", "*"]]]
270 ]],
271 ["inline", [
272 ["punctuation", "+"], "monospace", ["punctuation", "+"]
273 ]],
274 ["inline", [
275 ["punctuation", "#"], "unquoted", ["punctuation", "#"]
276 ]],
277 ["inline", [
278 ["italic", [["punctuation", "__"], "emphasis", ["punctuation", "__"]]]
279 ]],
280 ["inline", [
281 ["bold", [["punctuation", "**"], "strong", ["punctuation", "**"]]]
282 ]],
283 ["inline", [
284 ["punctuation", "++"], "monospace", ["punctuation", "++"]
285 ]],
286 ["inline", [
287 ["punctuation", "+++"], "passthrough", ["punctuation", "+++"]
288 ]],
289 ["inline", [
290 ["punctuation", "##"], "unquoted", ["punctuation", "##"]
291 ]],
292 ["inline", [
293 ["punctuation", "$$"], "passthrough", ["punctuation", "$$"]
294 ]],
295 ["inline", [
296 ["punctuation", "~"], "subscript", ["punctuation", "~"]
297 ]],
298 ["inline", [
299 ["punctuation", "^"], "superscript", ["punctuation", "^"]
300 ]],
301 ["inline", [
302 ["attribute-ref", [["punctuation", "{"], ["variable", "attribute-reference"], ["punctuation", "}"]]]
303 ]],
304 ["inline", [
305 ["url", [["punctuation", "[["], "anchor", ["punctuation", "]]"]]]
306 ]],
307 ["inline", [
308 ["url", [["punctuation", "[[["], "bibliography anchor", ["punctuation", "]]]"]]]
309 ]],
310 ["inline", [
311 ["url", [["punctuation", "<<"], "xref", ["punctuation", ">>"]]]
312 ]],
313 ["inline", [
314 ["punctuation", "((("], "indexes", ["punctuation", ")))"]
315 ]],
316 ["inline", [
317 ["punctuation", "(("], "indexes", ["punctuation", "))"]
318 ]],
319
320 ["punctuation", "===="]
321 ]],
322
323 ["table", [
324 ["punctuation", "|===="],
325 ["punctuation", "|"],
326
327 ["inline", [
328 ["italic", [["punctuation", "_"], "emphasis", ["punctuation", "_"]]]
329 ]],
330 ["inline", [
331 ["punctuation", "``"], "double quotes", ["punctuation", "''"]
332 ]],
333 ["inline", [
334 ["punctuation", "`"], "single quotes", ["punctuation", "'"]
335 ]],
336 ["inline", [
337 ["punctuation", "`"], "monospace", ["punctuation", "`"]
338 ]],
339 ["inline", [
340 ["italic", [["punctuation", "'"], "emphasis", ["punctuation", "'"]]]
341 ]],
342 ["inline", [
343 ["bold", [["punctuation", "*"], "strong", ["punctuation", "*"]]]
344 ]],
345 ["inline", [
346 ["punctuation", "+"], "monospace", ["punctuation", "+"]
347 ]],
348 ["inline", [
349 ["punctuation", "#"], "unquoted", ["punctuation", "#"]
350 ]],
351 ["inline", [
352 ["italic", [["punctuation", "__"], "emphasis", ["punctuation", "__"]]]
353 ]],
354 ["inline", [
355 ["bold", [["punctuation", "**"], "strong", ["punctuation", "**"]]]
356 ]],
357 ["inline", [
358 ["punctuation", "++"], "monospace", ["punctuation", "++"]
359 ]],
360 ["inline", [
361 ["punctuation", "+++"], "passthrough", ["punctuation", "+++"]
362 ]],
363 ["inline", [
364 ["punctuation", "##"], "unquoted", ["punctuation", "##"]
365 ]],
366 ["inline", [
367 ["punctuation", "$$"], "passthrough", ["punctuation", "$$"]
368 ]],
369 ["inline", [
370 ["punctuation", "~"], "subscript", ["punctuation", "~"]
371 ]],
372 ["inline", [
373 ["punctuation", "^"], "superscript", ["punctuation", "^"]
374 ]],
375 ["inline", [
376 ["attribute-ref", [["punctuation", "{"], ["variable", "attribute-reference"], ["punctuation", "}"]]]
377 ]],
378 ["inline", [
379 ["url", [["punctuation", "[["], "anchor", ["punctuation", "]]"]]]
380 ]],
381 ["inline", [
382 ["url", [["punctuation", "[[["], "bibliography anchor", ["punctuation", "]]]"]]]
383 ]],
384 ["inline", [
385 ["url", [["punctuation", "<<"], "xref", ["punctuation", ">>"]]]
386 ]],
387 ["inline", [
388 ["punctuation", "((("], "indexes", ["punctuation", ")))"]
389 ]],
390 ["inline", [
391 ["punctuation", "(("], "indexes", ["punctuation", "))"]
392 ]],
393
394 ["punctuation", "|===="]
395 ]],
396
397 ["attributes", [
398 ["punctuation", "["],
399 ["interpreted", [
400 ["punctuation", "'"],
401 "foo ", ["inline", [["bold", [["punctuation", "*"], "bar", ["punctuation", "*"]]]]], " baz",
402 ["punctuation", "'"]
403 ]],
404 ["punctuation", "]"]
405 ]],
406
407 ["title", [
408 ["punctuation", "=="],
409 " foo ", ["inline", [["bold", [["punctuation", "*"], "bar", ["punctuation", "*"]]]]], " baz ",
410 ["punctuation", "=="]
411 ]],
412
413 ["inline", [
414 ["attribute-ref", [
415 ["punctuation", "{"],
416 ["variable", "names"],
417 ["operator", "="],
418 "value",
419 ["punctuation", "}"]
420 ]]
421 ]],
422 ["inline", [
423 ["attribute-ref", [
424 ["punctuation", "{"],
425 ["variable", "names"],
426 ["operator", "?"],
427 "value",
428 ["punctuation", "}"]
429 ]]
430 ]],
431 ["inline", [
432 ["attribute-ref", [
433 ["punctuation", "{"],
434 ["variable", "names"],
435 ["operator", "!"],
436 "value",
437 ["punctuation", "}"]
438 ]]
439 ]],
440 ["inline", [
441 ["attribute-ref", [
442 ["punctuation", "{"],
443 ["variable", "names"],
444 ["operator", "#"],
445 "value",
446 ["punctuation", "}"]
447 ]]
448 ]],
449 ["inline", [
450 ["attribute-ref", [
451 ["punctuation", "{"],
452 ["variable", "names"],
453 ["operator", "%"],
454 "value",
455 ["punctuation", "}"]
456 ]]
457 ]],
458 ["inline", [
459 ["attribute-ref", [
460 ["punctuation", "{"],
461 ["variable", "names"],
462 ["operator", "@"],
463 "regexp", ["punctuation", ":"],
464 "value1", ["punctuation", ":"],
465 "value2",
466 ["punctuation", "}"]
467 ]]
468 ]],
469 ["inline", [
470 ["attribute-ref", [
471 ["punctuation", "{"],
472 ["variable", "names"],
473 ["operator", "$"],
474 "regexp", ["punctuation", ":"],
475 "value1", ["punctuation", ":"],
476 "value2",
477 ["punctuation", "}"]
478 ]]
479 ]],
480 ["inline", [
481 ["attribute-ref", [
482 ["punctuation", "{"],
483 ["variable", "names"],
484 ["operator", "$"],
485 "regexp", ["punctuation", "::"],
486 "value",
487 ["punctuation", "}"]
488 ]]
489 ]],
490 ["inline", [
491 ["attribute-ref", [
492 ["punctuation", "{"],
493 ["variable", "foo,bar"],
494 ["operator", "="],
495 "foobar",
496 ["punctuation", "}"]
497 ]]
498 ]],
499 ["inline", [
500 ["attribute-ref", [
501 ["punctuation", "{"],
502 ["variable", "foo+bar"],
503 ["operator", "="],
504 "foobar",
505 ["punctuation", "}"]
506 ]]
507 ]],
508 ["inline", [
509 ["attribute-ref", [
510 ["punctuation", "{"],
511 ["variable", "counter"],
512 ["punctuation", ":"],
513 "attrname",
514 ["punctuation", "}"]
515 ]]
516 ]]
517 ]
518
519 ----------------------------------------------------
520
521 Checks for all kinds of inline quoted text.