Debian Codegraph @

tests/languages/asciidoc/attributes_feature.test

raw
1 Foo [big red yellow-background]#obvious#
2
3 [float]
4 [quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]']
5 [quote,'"with *an* image" image:foo.png[] (TM)']
6
7 [NOTE]
8 [icon="./images/icons/wink.png"]
9 [icons=None, caption="My Special Note"]
10 [start=7]
11
12 [cols="e,m,^,>s",width="25%"]
13
14 =====
15 Foo [big red yellow-background]#obvious#
16
17 [float]
18 [quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]']
19 [quote,'"with *an* image" image:foo.png[] (TM)']
20
21 [NOTE]
22 [icon="./images/icons/wink.png"]
23 [icons=None, caption="My Special Note"]
24 [start=7]
25
26 [cols="e,m,^,>s",width="25%"]
27 =====
28
29 |=====
30 |
31 Foo [big red yellow-background]#obvious#
32
33 [float]
34 [quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]']
35 [quote,'"with *an* image" image:foo.png[] (TM)']
36
37 [NOTE]
38 [icon="./images/icons/wink.png"]
39 [icons=None, caption="My Special Note"]
40 [start=7]
41
42 [cols="e,m,^,>s",width="25%"]
43 |=====
44
45
46 latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$]
47 asciimath:[`x/x={(1,if x!=0),(text{undefined},if x=0):}`]
48 latexmath:[$\sum_{n=1}^\infty \frac{1}{2^n}$]
49
50 ----------------------------------------------------
51
52 [
53 "Foo ",
54 ["inline", [
55 ["attributes", [
56 ["punctuation", "["],
57 ["attr-value", "big red yellow-background"],
58 ["punctuation", "]"]
59 ]],
60 ["punctuation", "#"], "obvious", ["punctuation", "#"]
61 ]],
62
63 ["attributes", [
64 ["punctuation", "["], ["attr-value", "float"], ["punctuation", "]"]
65 ]],
66 ["attributes", [
67 ["punctuation", "["],
68 ["attr-value", "quote"], ["punctuation", ","],
69 ["interpreted", [
70 ["punctuation", "'"],
71 ["macro", [
72 ["function", "http"], ["punctuation", ":"],
73 "//en.wikipedia.org/wiki/Samuel_Johnson",
74 ["attributes", [
75 ["punctuation", "["],
76 ["attr-value", "Samuel Johnson"],
77 ["punctuation", "]"]
78 ]]
79 ]],
80 ["punctuation", "'"]
81 ]],
82 ["punctuation", "]"]
83 ]],
84 ["attributes", [
85 ["punctuation", "["],
86 ["attr-value", "quote"], ["punctuation", ","],
87 ["interpreted", [
88 ["punctuation", "'"],
89 ["entity", """],
90 "with ",
91 ["inline", [
92 ["bold", [
93 ["punctuation", "*"], "an", ["punctuation", "*"]
94 ]]
95 ]],
96 " image",
97 ["entity", """],
98 ["macro", [
99 ["function", "image"], ["punctuation", ":"],
100 "foo.png",
101 ["attributes", [
102 ["punctuation", "["], ["punctuation", "]"]
103 ]]
104 ]],
105 ["replacement", "(TM)"],
106 ["punctuation", "'"]
107 ]],
108 ["punctuation", "]"]
109 ]],
110
111 ["attributes", [
112 ["punctuation", "["], ["attr-value", "NOTE"], ["punctuation", "]"]
113 ]],
114 ["attributes", [
115 ["punctuation", "["],
116 ["variable", "icon"],
117 ["operator", "="],
118 ["string", "\"./images/icons/wink.png\""],
119 ["punctuation", "]"]
120 ]],
121 ["attributes", [
122 ["punctuation", "["],
123 ["variable", "icons"],
124 ["operator", "="],
125 ["attr-value", "None"],
126 ["punctuation", ","],
127 ["variable", "caption"],
128 ["operator", "="],
129 ["string", "\"My Special Note\""],
130 ["punctuation", "]"]
131 ]],
132 ["attributes", [
133 ["punctuation", "["],
134 ["variable", "start"],
135 ["operator", "="],
136 ["attr-value", "7"],
137 ["punctuation", "]"]
138 ]],
139
140 ["attributes", [
141 ["punctuation", "["],
142 ["variable", "cols"],
143 ["operator", "="],
144 ["string", "\"e,m,^,>s\""],
145 ["punctuation", ","],
146 ["variable", "width"],
147 ["operator", "="],
148 ["string", "\"25%\""],
149 ["punctuation", "]"]
150 ]],
151
152 ["other-block", [
153 ["punctuation", "====="],
154
155 "\r\nFoo ",
156 ["inline", [
157 ["attributes", [
158 ["punctuation", "["],
159 ["attr-value", "big red yellow-background"],
160 ["punctuation", "]"]
161 ]],
162 ["punctuation", "#"], "obvious", ["punctuation", "#"]
163 ]],
164
165 ["attributes", [
166 ["punctuation", "["], ["attr-value", "float"], ["punctuation", "]"]
167 ]],
168 ["attributes", [
169 ["punctuation", "["],
170 ["attr-value", "quote"], ["punctuation", ","],
171 ["interpreted", [
172 ["punctuation", "'"],
173 ["macro", [
174 ["function", "http"], ["punctuation", ":"],
175 "//en.wikipedia.org/wiki/Samuel_Johnson",
176 ["attributes", [
177 ["punctuation", "["],
178 ["attr-value", "Samuel Johnson"],
179 ["punctuation", "]"]
180 ]]
181 ]],
182 ["punctuation", "'"]
183 ]],
184 ["punctuation", "]"]
185 ]],
186 ["attributes", [
187 ["punctuation", "["],
188 ["attr-value", "quote"], ["punctuation", ","],
189 ["interpreted", [
190 ["punctuation", "'"],
191 ["entity", """],
192 "with ",
193 ["inline", [
194 ["bold", [
195 ["punctuation", "*"], "an", ["punctuation", "*"]
196 ]]
197 ]],
198 " image",
199 ["entity", """],
200 ["macro", [
201 ["function", "image"], ["punctuation", ":"],
202 "foo.png",
203 ["attributes", [
204 ["punctuation", "["], ["punctuation", "]"]
205 ]]
206 ]],
207 ["replacement", "(TM)"],
208 ["punctuation", "'"]
209 ]],
210 ["punctuation", "]"]
211 ]],
212
213 ["attributes", [
214 ["punctuation", "["], ["attr-value", "NOTE"], ["punctuation", "]"]
215 ]],
216 ["attributes", [
217 ["punctuation", "["],
218 ["variable", "icon"],
219 ["operator", "="],
220 ["string", "\"./images/icons/wink.png\""],
221 ["punctuation", "]"]
222 ]],
223 ["attributes", [
224 ["punctuation", "["],
225 ["variable", "icons"],
226 ["operator", "="],
227 ["attr-value", "None"],
228 ["punctuation", ","],
229 ["variable", "caption"],
230 ["operator", "="],
231 ["string", "\"My Special Note\""],
232 ["punctuation", "]"]
233 ]],
234 ["attributes", [
235 ["punctuation", "["],
236 ["variable", "start"],
237 ["operator", "="],
238 ["attr-value", "7"],
239 ["punctuation", "]"]
240 ]],
241
242 ["attributes", [
243 ["punctuation", "["],
244 ["variable", "cols"],
245 ["operator", "="],
246 ["string", "\"e,m,^,>s\""],
247 ["punctuation", ","],
248 ["variable", "width"],
249 ["operator", "="],
250 ["string", "\"25%\""],
251 ["punctuation", "]"]
252 ]],
253
254 ["punctuation", "====="]
255 ]],
256
257 ["table", [
258 ["punctuation", "|====="],
259 ["punctuation", "|"],
260
261 "\r\nFoo ",
262 ["inline", [
263 ["attributes", [
264 ["punctuation", "["],
265 ["attr-value", "big red yellow-background"],
266 ["punctuation", "]"]
267 ]],
268 ["punctuation", "#"], "obvious", ["punctuation", "#"]
269 ]],
270
271 ["attributes", [
272 ["punctuation", "["], ["attr-value", "float"], ["punctuation", "]"]
273 ]],
274 ["attributes", [
275 ["punctuation", "["],
276 ["attr-value", "quote"], ["punctuation", ","],
277 ["interpreted", [
278 ["punctuation", "'"],
279 ["macro", [
280 ["function", "http"], ["punctuation", ":"],
281 "//en.wikipedia.org/wiki/Samuel_Johnson",
282 ["attributes", [
283 ["punctuation", "["],
284 ["attr-value", "Samuel Johnson"],
285 ["punctuation", "]"]
286 ]]
287 ]],
288 ["punctuation", "'"]
289 ]],
290 ["punctuation", "]"]
291 ]],
292 ["attributes", [
293 ["punctuation", "["],
294 ["attr-value", "quote"], ["punctuation", ","],
295 ["interpreted", [
296 ["punctuation", "'"],
297 ["entity", """],
298 "with ",
299 ["inline", [
300 ["bold", [
301 ["punctuation", "*"], "an", ["punctuation", "*"]
302 ]]
303 ]],
304 " image",
305 ["entity", """],
306 ["macro", [
307 ["function", "image"], ["punctuation", ":"],
308 "foo.png",
309 ["attributes", [
310 ["punctuation", "["], ["punctuation", "]"]
311 ]]
312 ]],
313 ["replacement", "(TM)"],
314 ["punctuation", "'"]
315 ]],
316 ["punctuation", "]"]
317 ]],
318
319 ["attributes", [
320 ["punctuation", "["], ["attr-value", "NOTE"], ["punctuation", "]"]
321 ]],
322 ["attributes", [
323 ["punctuation", "["],
324 ["variable", "icon"],
325 ["operator", "="],
326 ["string", "\"./images/icons/wink.png\""],
327 ["punctuation", "]"]
328 ]],
329 ["attributes", [
330 ["punctuation", "["],
331 ["variable", "icons"],
332 ["operator", "="],
333 ["attr-value", "None"],
334 ["punctuation", ","],
335 ["variable", "caption"],
336 ["operator", "="],
337 ["string", "\"My Special Note\""],
338 ["punctuation", "]"]
339 ]],
340 ["attributes", [
341 ["punctuation", "["],
342 ["variable", "start"],
343 ["operator", "="],
344 ["attr-value", "7"],
345 ["punctuation", "]"]
346 ]],
347
348 ["attributes", [
349 ["punctuation", "["],
350 ["variable", "cols"],
351 ["operator", "="],
352 ["string", "\"e,m,^,>s\""],
353 ["punctuation", ","],
354 ["variable", "width"],
355 ["operator", "="],
356 ["string", "\"25%\""],
357 ["punctuation", "]"]
358 ]],
359
360 ["punctuation", "|====="]
361 ]],
362
363 ["macro", [
364 ["function", "latexmath"], ["punctuation", ":"],
365 ["attributes", [
366 ["punctuation", "["],
367 ["quoted", [
368 ["punctuation", "$"],
369 "C = \\alpha + \\beta Y^{\\gamma} + \\epsilon",
370 ["punctuation", "$"]
371 ]],
372 ["punctuation", "]"]
373 ]]
374 ]],
375 ["macro", [
376 ["function", "asciimath"], ["punctuation", ":"],
377 ["attributes", [
378 ["punctuation", "["],
379 ["quoted", [
380 ["punctuation", "`"],
381 "x/x={(1,if x!=0),(text{undefined},if x=0):}",
382 ["punctuation", "`"]
383 ]],
384 ["punctuation", "]"]
385 ]]
386 ]],
387 ["macro", [
388 ["function", "latexmath"], ["punctuation", ":"],
389 ["attributes", [
390 ["punctuation", "["],
391 ["quoted", [
392 ["punctuation", "$"],
393 "\\sum_{n=1}^\\infty \\frac{1}{2^n}",
394 ["punctuation", "$"]
395 ]],
396 ["punctuation", "]"]
397 ]]
398 ]]
399 ]
400
401 ----------------------------------------------------
402
403 Checks for attributes.