Commit c4cbeeaa654691f92d11a6f068e16492f09ecae2

Michael Schmidt 2022-06-25T12:04:21

AsciiDoc: Some regexes are too greedy (#3481)

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
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
diff --git a/components/prism-asciidoc.js b/components/prism-asciidoc.js
index b4818e5..b639a17 100644
--- a/components/prism-asciidoc.js
+++ b/components/prism-asciidoc.js
@@ -28,7 +28,7 @@
 
 	var asciidoc = Prism.languages.asciidoc = {
 		'comment-block': {
-			pattern: /^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,
+			pattern: /^(\/{4,})$[\s\S]*?^\1/m,
 			alias: 'comment'
 		},
 		'table': {
@@ -47,7 +47,7 @@
 		},
 
 		'passthrough-block': {
-			pattern: /^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
+			pattern: /^(\+{4,})$[\s\S]*?^\1$/m,
 			inside: {
 				'punctuation': /^\++|\++$/
 				// See rest below
@@ -55,7 +55,7 @@
 		},
 		// Literal blocks and listing blocks
 		'literal-block': {
-			pattern: /^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
+			pattern: /^(-{4,}|\.{4,})$[\s\S]*?^\1$/m,
 			inside: {
 				'punctuation': /^(?:-+|\.+)|(?:-+|\.+)$/
 				// See rest below
@@ -63,7 +63,7 @@
 		},
 		// Sidebar blocks, quote blocks, example blocks and open blocks
 		'other-block': {
-			pattern: /^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
+			pattern: /^(--|\*{4,}|_{4,}|={4,})$[\s\S]*?^\1$/m,
 			inside: {
 				'punctuation': /^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/
 				// See rest below
diff --git a/components/prism-asciidoc.min.js b/components/prism-asciidoc.min.js
index e1badd1..6ca04ca 100644
--- a/components/prism-asciidoc.min.js
+++ b/components/prism-asciidoc.min.js
@@ -1 +1 @@
-!function(t){var n={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},i=t.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)<?\d*>/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|R|TM)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function e(t){for(var n={},e=0,a=(t=t.split(" ")).length;e<a;e++)n[t[e]]=i[t[e]];return n}n.inside.interpreted.inside.rest=e("macro inline replacement entity"),i["passthrough-block"].inside.rest=e("macro"),i["literal-block"].inside.rest=e("callout"),i.table.inside.rest=e("comment-block passthrough-block literal-block other-block list-punctuation indented-block comment title attribute-entry attributes hr page-break admonition list-label callout macro inline replacement entity line-continuation"),i["other-block"].inside.rest=e("table list-punctuation indented-block comment attribute-entry attributes hr page-break admonition list-label macro inline replacement entity line-continuation"),i.title.inside.rest=e("macro inline replacement entity"),t.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&amp;/,"&"))})),t.languages.adoc=t.languages.asciidoc}(Prism);
\ No newline at end of file
+!function(t){var n={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},i=t.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})$[\s\S]*?^\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)<?\d*>/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|R|TM)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function e(t){for(var n={},e=0,a=(t=t.split(" ")).length;e<a;e++)n[t[e]]=i[t[e]];return n}n.inside.interpreted.inside.rest=e("macro inline replacement entity"),i["passthrough-block"].inside.rest=e("macro"),i["literal-block"].inside.rest=e("callout"),i.table.inside.rest=e("comment-block passthrough-block literal-block other-block list-punctuation indented-block comment title attribute-entry attributes hr page-break admonition list-label callout macro inline replacement entity line-continuation"),i["other-block"].inside.rest=e("table list-punctuation indented-block comment attribute-entry attributes hr page-break admonition list-label macro inline replacement entity line-continuation"),i.title.inside.rest=e("macro inline replacement entity"),t.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&amp;/,"&"))})),t.languages.adoc=t.languages.asciidoc}(Prism);
\ No newline at end of file
diff --git a/tests/languages/asciidoc/issue3480.test b/tests/languages/asciidoc/issue3480.test
new file mode 100644
index 0000000..2b6bdae
--- /dev/null
+++ b/tests/languages/asciidoc/issue3480.test
@@ -0,0 +1,1068 @@
+// View this document online at https://asciidoctor.org/docs/asciidoc-writers-guide/
+= AsciiDoc Writer's Guide
+Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
+:description: This guide describes the basic structure of an AsciiDoc document, how to create your first AsciiDoc document, how to add other structural elements such as lists, block quotes and source code, and how to convert an AsciiDoc document to HTML, DocBook and PDF.
+:keywords: AsciiDoc, Asciidoctor, syntax, reference, learn, how to, writers, authors
+:page-description: {description}
+:page-keywords: {keywords}
+:page-layout: docs
+ifndef::env-site[]
+:toc: left
+:icons: font
+:idprefix:
+:idseparator: -
+:sectanchors:
+:source-highlighter: highlightjs
+endif::[]
+:experimental:
+:mdash: &#8212;
+:language: asciidoc
+:source-language: {language}
+:table-caption!:
+:example-caption!:
+:figure-caption!:
+:imagesdir: ../images
+// Refs
+:url-docs-asciidoc: https://docs.asciidoctor.org/asciidoc/latest/
+:url-quickref: {url-docs-asciidoc}syntax-quick-reference/
+:user-ref: https://asciidoctor.org/docs/user-manual
+:asciidoctor-ref: https://asciidoctor.org/
+:asciidoctor-gem-ref: https://rubygems.org/gems/asciidoctor
+:uri-install: https://asciidoctor.org/docs/install-toolchain/
+:fopub-doc-ref: https://github.com/asciidoctor/asciidoctor-fopub#readme
+:docs-ref: https://asciidoctor.org/docs
+:gist-ref: https://gist.github.com
+:snippets-ref: https://gitlab.com/explore/snippets
+:publican-ref: https://fedorahosted.org/publican
+
+This guide provides a gentle introduction to AsciiDoc, a _plain text_ documentation *syntax* and *processor*.
+This introduction is intended for anyone who wants to reduce the effort required to write and publish content, whether for technical documentation, articles, web pages or good ol'-fashioned prose.
+
+TIP: If you want to know what AsciiDoc is all about, find the answer in {url-docs-asciidoc}#about-asciidoc[About AsciiDoc].
+If you're looking for a concise survey of the AsciiDoc syntax, consult the {url-quickref}[AsciiDoc Syntax Quick Reference].
+
+In this guide, you'll learn:
+
+- The basic structure of an AsciiDoc document
+- How to create your first AsciiDoc document
+- How to add other structural elements such as lists, block quotes and source code
+- How to convert an AsciiDoc document to HTML, DocBook and PDF
+
+In addition to covering the AsciiDoc basics, this guide also suggests a set of conventions to help you create more consistent documents and maximize your writing productivity.
+
+Let's dive in to AsciiDoc!
+
+== Writing in AsciiDoc
+
+The goal of this section is to teach you how to compose your first AsciiDoc document.
+Hopefully, when you look back, you'll agree it just makes sense.
+
+Your adventure with AsciiDoc begins in your favorite text editor.
+
+=== It's just text, mate.
+
+Since AsciiDoc syntax is just _plain text_, you can write an AsciiDoc document using _any_ text editor.
+You don't need complex word processing programs like Microsoft Word, OpenOffice Writer or Google Docs.
+In fact, you _shouldn't_ use these programs because they add cruft to your document (that you can't see) and makes conversion tedious.
+
+TIP: While it's true any text editor will do, I recommend selecting an editor that supports syntax highlighting for AsciiDoc.
+The *[red]##c##[green]##o##[purple]##l##[fuchsia]##o##[blue]##r##* brings contrast to the text, making it easier to read.
+The highlighting also confirms when you've entered the correct syntax for an inline or block element.
+
+The most popular application for editing plain text on macOS is *TextMate*.
+A similar choice on Linux is *GEdit*.
+On Windows, stay away from Notepad and Wordpad because they produce plain text which is not cross-platform friendly.
+Opt instead for a competent text editor like *Notepad++*.
+If you're a programmer (or a writer with an inner geek), you'll likely prefer *Vim*, *Emacs*, or *Sublime Text*, all of which are available cross-platform.
+The key feature all these editors share is syntax highlighting for AsciiDoc.
+
+Open up your favorite text editor and get ready to write some AsciiDoc!
+
+=== Content is king!
+
+The bulk of the content in a document is paragraph text.
+This is why Asciidoctor doesn't require any special markup or attributes to specify paragraph content.
+You can just start typing.
+
+In Asciidoctor, adjacent or consecutive lines of text form a paragraph element.
+To start a new paragraph after another element, such as a section title or table, hit the kbd:[RETURN] key twice to insert a blank line, and then continue typing your content.
+
+.Two paragraphs in an AsciiDoc document
+[source]
+----
+This journey begins one late Monday afternoon in Antwerp.
+Our team desperately needs coffee, but none of us dare open the office door.
+
+To leave means code dismemberment and certain death.
+----
+
+.The two paragraphs rendered using the default (html5) converter and stylesheet (asciidoctor.css)
+====
+This journey begins one late Monday afternoon in Antwerp.
+Our team desperately needs coffee, but none of us dare open the office door.
+
+To leave means code dismemberment and certain death.
+====
+
+Just like that, *you're writing in AsciiDoc!*
+As you can see, it's just like writing an e-mail.
+
+Save the file with a file extension of `.adoc`.
+
+TIP: If you want to find out how to convert the document to HTML, DocBook or PDF, skip ahead to the section on <<converting-your-document>>.
+
+==== Wrapped text and hard line breaks
+
+Since adjacent lines of text are combined into a single paragraph when Asciidoctor converts a document, that means you can wrap paragraph text or put each sentence or phrase on a separate line.
+The line breaks won't appear in the output.
+
+However, if you want the line breaks in a paragraph to be preserved, you can either use a space followed by a plus sign (`{plus}`) or set the `hardbreaks` option on the paragraph.
+This results in a visible line break (e.g., `<br>`) following each line.
+
+[source]
+.Line breaks preserved using a space followed by the plus sign ({plus})
+----
+Rubies are red, +
+Topazes are blue.
+----
+
+====
+Rubies are red, +
+Topazes are blue.
+====
+
+[source]
+.Line breaks preserved using the hardbreaks option
+----
+[%hardbreaks]
+Ruby is red.
+Java is black.
+----
+
+====
+[%hardbreaks]
+Ruby is red.
+Java is black.
+====
+
+To preserve line breaks throughout your whole document, add the `hardbreaks` attribute to the document's header.
+
+.Line breaks preserved throughout the document using the hardbreaks attribute
+[source]
+----
+= Line Break Doc Title
+:hardbreaks:
+
+Rubies are red,
+Topazes are blue.
+----
+
+=== Admonitions
+
+There are certain statements you may want to draw attention to by taking them out of the content's flow and labeling them with a priority.
+These are called admonitions.
+It's rendered style is determined by the assigned label (i.e., value).
+Asciidoctor provides five admonition style labels:
+
+* `NOTE`
+* `TIP`
+* `IMPORTANT`
+* `CAUTION`
+* `WARNING`
+
+.Caution vs. Warning
+[#caution-vs-warning]
+****
+When choosing the admonition type, you may find yourself getting confused between "caution" and "warning" as these words are often used interchangeably.
+Here's a simple rule to help you differentiate the two:
+
+* Use *CAUTION* to advise the reader to _act_ carefully (i.e., exercise care).
+* Use *WARNING* to inform the reader of danger, harm, or consequences that exist.
+
+To find a deeper analysis, see https://www.differencebetween.com/difference-between-caution-and-vs-warning/.
+****
+
+When you want to call attention to a single paragraph, start the first line of the paragraph with the label you want to use.
+The label must be uppercase and followed by a colon (`:`).
+
+.Admonition paragraph syntax
+[source]
+----
+WARNING: Wolpertingers are known to nest in server racks. <1> <2>
+Enter at your own risk.
+----
+<1> The label must be uppercase and immediately followed by a colon (`:`).
+<2> Separate the first line of the paragraph from the label by a single space.
+
+.Result: Admonition paragraph
+====
+WARNING: Wolpertingers are known to nest in server racks.
+Enter at your own risk.
+====
+
+An admonition paragraph is rendered in a callout box with the admonition label--or its corresponding icon--in the gutter.
+Icons are enabled by setting the `icons` attribute on the document.
+
+NOTE: Admonitions can also encapsulate any block content, which we'll cover later.
+
+=== Mild punctuation, strong impact
+
+Just as we emphasize certain words and phrases when we speak, we can emphasize them in text by surrounding them with punctuation.
+AsciiDoc refers to this markup as _quoted text_.
+
+==== Quoted text
+
+For instance, in an e-mail, you might "`speak`" a word louder by enclosing it in asterisks.
+
+[source]
+I can't believe it, we *won*!
+
+As you would expect, the asterisks make the text *won* bold.
+You can almost sense the emotion.
+This is one example of quoted (i.e., formatted) text.
+
+NOTE: The term "`quote`" is used liberally here to apply to any symbols that surround text in order to apply emphasis or special meaning.
+
+Here are the forms of quoted text that AsciiDoc recognizes:
+
+.Bold, italic, and monospace formatting syntax
+[source]
+----
+bold *constrained* & **un**constrained
+
+italic _constrained_ & __un__constrained
+
+bold italic *_constrained_* & **__un__**constrained
+
+monospace `constrained` & ``un``constrained
+
+monospace bold `*constrained*` & ``**un**``constrained
+
+monospace italic `_constrained_` & ``__un__``constrained
+
+monospace bold italic `*_constrained_*` & ``**__un__**``constrained
+----
+
+When you want to quote text (e.g., place emphasis) somewhere other than at the boundaries of a word, you need to double up the punctuation.
+
+.Result: Bold, italic, and monospace text
+====
+bold *constrained* & **un**constrained
+
+italic _constrained_ & __un__constrained
+
+bold italic *_constrained_* & **__un__**constrained
+
+monospace `constrained` & ``un``constrained
+
+monospace bold `*constrained*` & ``**un**``constrained
+
+monospace italic `_constrained_` & ``__un__``constrained
+
+monospace bold italic `*_constrained_*` & ``**__un__**``constrained
+====
+
+Any quoted text can be prefixed with an attribute list.
+The first positional attribute is treated as a role.
+The role can be used to apply custom styling to the text.
+For instance:
+
+[source]
+Type the word [.userinput]#asciidoc# into the search bar.
+
+When converting to HTML, the word "`asciidoc`" is wrapped in `<span>` tags and the role is used as the element's CSS class:
+
+[source,xml]
+<span class="userinput">asciidoc</span>
+
+You can apply styles to the text using CSS.
+
+You may not always want these substitutions to take place.
+In those cases, you'll need to use markup to escape the text.
+
+----------------------------------------------------
+
+[
+	["comment", "// View this document online at https://asciidoctor.org/docs/asciidoc-writers-guide/"],
+	["title", [
+		["punctuation", "="],
+		" AsciiDoc Writer's Guide"
+	]],
+	"\r\nDan Allen <",
+	["macro", [
+		["function", "https"],
+		["punctuation", ":"],
+		"//github.com/mojavelinux",
+		["attributes", [
+			["punctuation", "["],
+			["attr-value", "@mojavelinux"],
+			["punctuation", "]"]
+		]]
+	]],
+	">; Sarah White <",
+	["macro", [
+		["function", "https"],
+		["punctuation", ":"],
+		"//github.com/graphitefriction",
+		["attributes", [
+			["punctuation", "["],
+			["attr-value", "@graphitefriction"],
+			["punctuation", "]"]
+		]]
+	]],
+	">\r\n",
+	["attribute-entry", ":description: This guide describes the basic structure of an AsciiDoc document, how to create your first AsciiDoc document, how to add other structural elements such as lists, block quotes and source code, and how to convert an AsciiDoc document to HTML, DocBook and PDF."],
+	["attribute-entry", ":keywords: AsciiDoc, Asciidoctor, syntax, reference, learn, how to, writers, authors"],
+	["attribute-entry", ":page-description: {description}"],
+	["attribute-entry", ":page-keywords: {keywords}"],
+	["attribute-entry", ":page-layout: docs"],
+	["macro", [
+		["function", "ifndef"],
+		["punctuation", "::"],
+		"env-site",
+		["attributes", [
+			["punctuation", "["],
+			["punctuation", "]"]
+		]]
+	]],
+	["attribute-entry", ":toc: left"],
+	["attribute-entry", ":icons: font"],
+	["attribute-entry", ":idprefix:"],
+	["attribute-entry", ":idseparator: -"],
+	["attribute-entry", ":sectanchors:"],
+	["attribute-entry", ":source-highlighter: highlightjs"],
+	["macro", [
+		["function", "endif"],
+		["punctuation", "::"],
+		["attributes", [
+			["punctuation", "["],
+			["punctuation", "]"]
+		]]
+	]],
+	["attribute-entry", ":experimental:"],
+	["attribute-entry", ":mdash: &#8212;"],
+	["attribute-entry", ":language: asciidoc"],
+	["attribute-entry", ":source-language: {language}"],
+	["attribute-entry", ":table-caption!:"],
+	["attribute-entry", ":example-caption!:"],
+	["attribute-entry", ":figure-caption!:"],
+	["attribute-entry", ":imagesdir: ../images"],
+	["comment", "// Refs"],
+	["attribute-entry", ":url-docs-asciidoc: https://docs.asciidoctor.org/asciidoc/latest/"],
+	["attribute-entry", ":url-quickref: {url-docs-asciidoc}syntax-quick-reference/"],
+	["attribute-entry", ":user-ref: https://asciidoctor.org/docs/user-manual"],
+	["attribute-entry", ":asciidoctor-ref: https://asciidoctor.org/"],
+	["attribute-entry", ":asciidoctor-gem-ref: https://rubygems.org/gems/asciidoctor"],
+	["attribute-entry", ":uri-install: https://asciidoctor.org/docs/install-toolchain/"],
+	["attribute-entry", ":fopub-doc-ref: https://github.com/asciidoctor/asciidoctor-fopub#readme"],
+	["attribute-entry", ":docs-ref: https://asciidoctor.org/docs"],
+	["attribute-entry", ":gist-ref: https://gist.github.com"],
+	["attribute-entry", ":snippets-ref: https://gitlab.com/explore/snippets"],
+	["attribute-entry", ":publican-ref: https://fedorahosted.org/publican"],
+
+	"\r\n\r\nThis guide provides a gentle introduction to AsciiDoc, a ",
+	["inline", [
+		["italic", [
+			["punctuation", "_"],
+			"plain text",
+			["punctuation", "_"]
+		]]
+	]],
+	" documentation ",
+	["inline", [
+		["bold", [
+			["punctuation", "*"],
+			"syntax",
+			["punctuation", "*"]
+		]]
+	]],
+	" and ",
+	["inline", [
+		["bold", [
+			["punctuation", "*"],
+			"processor",
+			["punctuation", "*"]
+		]]
+	]],
+	".\r\nThis introduction is intended for anyone who wants to reduce the effort required to write and publish content, whether for technical documentation, articles, web pages or good ol'-fashioned prose.\r\n\r\n",
+
+	["admonition", "TIP:"],
+	" If you want to know what AsciiDoc is all about, find the answer in ",
+	["inline", [
+		["attribute-ref", [
+			["punctuation", "{"],
+			["variable", "url-docs-asciidoc"],
+			["punctuation", "}"]
+		]]
+	]],
+	"#about-asciidoc[About AsciiDoc].\r\nIf you're looking for a concise survey of the AsciiDoc syntax, consult the ",
+	["inline", [
+		["attribute-ref", [
+			["punctuation", "{"],
+			["variable", "url-quickref"],
+			["punctuation", "}"]
+		]]
+	]],
+	"[AsciiDoc Syntax Quick Reference].\r\n\r\nIn this guide, you'll learn:\r\n\r\n",
+
+	["list-punctuation", "-"],
+	" The basic structure of an AsciiDoc document\r\n",
+
+	["list-punctuation", "-"],
+	" How to create your first AsciiDoc document\r\n",
+
+	["list-punctuation", "-"],
+	" How to add other structural elements such as lists, block quotes and source code\r\n",
+
+	["list-punctuation", "-"],
+	" How to convert an AsciiDoc document to HTML, DocBook and PDF\r\n\r\nIn addition to covering the AsciiDoc basics, this guide also suggests a set of conventions to help you create more consistent documents and maximize your writing productivity.\r\n\r\nLet's dive in to AsciiDoc!\r\n\r\n",
+
+	["title", [
+		["punctuation", "=="],
+		" Writing in AsciiDoc"
+	]],
+
+	"\r\n\r\nThe goal of this section is to teach you how to compose your first AsciiDoc document.\r\nHopefully, when you look back, you'll agree it just makes sense.\r\n\r\nYour adventure with AsciiDoc begins in your favorite text editor.\r\n\r\n",
+
+	["title", [
+		["punctuation", "==="],
+		" It's just text, mate."
+	]],
+
+	"\r\n\r\nSince AsciiDoc syntax is just ",
+	["inline", [
+		["italic", [
+			["punctuation", "_"],
+			"plain text",
+			["punctuation", "_"]
+		]]
+	]],
+	", you can write an AsciiDoc document using ",
+	["inline", [
+		["italic", [
+			["punctuation", "_"],
+			"any",
+			["punctuation", "_"]
+		]]
+	]],
+	" text editor.\r\nYou don't need complex word processing programs like Microsoft Word, OpenOffice Writer or Google Docs.\r\nIn fact, you ",
+	["inline", [
+		["italic", [
+			["punctuation", "_"],
+			"shouldn't",
+			["punctuation", "_"]
+		]]
+	]],
+	" use these programs because they add cruft to your document (that you can't see) and makes conversion tedious.\r\n\r\n",
+
+	["admonition", "TIP:"],
+	" While it's true any text editor will do, I recommend selecting an editor that supports syntax highlighting for AsciiDoc.\r\nThe ",
+	["inline", [
+		["bold", [
+			["punctuation", "*"],
+			"[red]##c##[green]##o##[purple]##l##[fuchsia]##o##[blue]##r##",
+			["punctuation", "*"]
+		]]
+	]],
+	" brings contrast to the text, making it easier to read.\r\nThe highlighting also confirms when you've entered the correct syntax for an inline or block element.\r\n\r\nThe most popular application for editing plain text on macOS is ",
+	["inline", [
+		["bold", [
+			["punctuation", "*"],
+			"TextMate",
+			["punctuation", "*"]
+		]]
+	]],
+	".\r\nA similar choice on Linux is ",
+	["inline", [
+		["bold", [
+			["punctuation", "*"],
+			"GEdit",
+			["punctuation", "*"]
+		]]
+	]],
+	".\r\nOn Windows, stay away from Notepad and Wordpad because they produce plain text which is not cross-platform friendly.\r\nOpt instead for a competent text editor like ",
+	["inline", [
+		["bold", [
+			["punctuation", "*"],
+			"Notepad++",
+			["punctuation", "*"]
+		]]
+	]],
+	".\r\nIf you're a programmer (or a writer with an inner geek), you'll likely prefer ",
+	["inline", [
+		["bold", [
+			["punctuation", "*"],
+			"Vim",
+			["punctuation", "*"]
+		]]
+	]],
+	", ",
+	["inline", [
+		["bold", [
+			["punctuation", "*"],
+			"Emacs",
+			["punctuation", "*"]
+		]]
+	]],
+	", or ",
+	["inline", [
+		["bold", [
+			["punctuation", "*"],
+			"Sublime Text",
+			["punctuation", "*"]
+		]]
+	]],
+	", all of which are available cross-platform.\r\nThe key feature all these editors share is syntax highlighting for AsciiDoc.\r\n\r\nOpen up your favorite text editor and get ready to write some AsciiDoc!\r\n\r\n",
+
+	["title", [
+		["punctuation", "==="],
+		" Content is king!"
+	]],
+
+	"\r\n\r\nThe bulk of the content in a document is paragraph text.\r\nThis is why Asciidoctor doesn't require any special markup or attributes to specify paragraph content.\r\nYou can just start typing.\r\n\r\nIn Asciidoctor, adjacent or consecutive lines of text form a paragraph element.\r\nTo start a new paragraph after another element, such as a section title or table, hit the ",
+	["macro", [
+		["function", "kbd"],
+		["punctuation", ":"],
+		["attributes", [
+			["punctuation", "["],
+			["attr-value", "RETURN"],
+			["punctuation", "]"]
+		]]
+	]],
+	" key twice to insert a blank line, and then continue typing your content.\r\n\r\n",
+
+	["title", [
+		["punctuation", "."],
+		"Two paragraphs in an AsciiDoc document"
+	]],
+	["attributes", [
+		["punctuation", "["],
+		["attr-value", "source"],
+		["punctuation", "]"]
+	]],
+	["literal-block", [
+		["punctuation", "----"],
+		"\r\nThis journey begins one late Monday afternoon in Antwerp.\r\nOur team desperately needs coffee, but none of us dare open the office door.\r\n\r\nTo leave means code dismemberment and certain death.\r\n",
+		["punctuation", "----"]
+	]],
+
+	["title", [
+		["punctuation", "."],
+		"The two paragraphs rendered using the default (html5) converter and stylesheet (asciidoctor.css)"
+	]],
+	["other-block", [
+		["punctuation", "===="],
+		"\r\nThis journey begins one late Monday afternoon in Antwerp.\r\nOur team desperately needs coffee, but none of us dare open the office door.\r\n\r\nTo leave means code dismemberment and certain death.\r\n",
+		["punctuation", "===="]
+	]],
+
+	"\r\n\r\nJust like that, ",
+	["inline", [
+		["bold", [
+			["punctuation", "*"],
+			"you're writing in AsciiDoc!",
+			["punctuation", "*"]
+		]]
+	]],
+
+	"\r\nAs you can see, it's just like writing an e-mail.\r\n\r\nSave the file with a file extension of ",
+	["inline", [
+		["punctuation", "`"],
+		".adoc",
+		["punctuation", "`"]
+	]],
+	".\r\n\r\n",
+
+	["admonition", "TIP:"],
+	" If you want to find out how to convert the document to HTML, DocBook or PDF, skip ahead to the section on ",
+	["inline", [
+		["url", [
+			["punctuation", "<<"],
+			"converting-your-document",
+			["punctuation", ">>"]
+		]]
+	]],
+	".\r\n\r\n",
+
+	["title", [
+		["punctuation", "===="],
+		" Wrapped text and hard line breaks"
+	]],
+
+	"\r\n\r\nSince adjacent lines of text are combined into a single paragraph when Asciidoctor converts a document, that means you can wrap paragraph text or put each sentence or phrase on a separate line.\r\nThe line breaks won't appear in the output.\r\n\r\nHowever, if you want the line breaks in a paragraph to be preserved, you can either use a space followed by a plus sign (",
+	["inline", [
+		["punctuation", "`"],
+		"{plus}",
+		["punctuation", "`"]
+	]],
+	") or set the ",
+	["inline", [
+		["punctuation", "`"],
+		"hardbreaks",
+		["punctuation", "`"]
+	]],
+	" option on the paragraph.\r\nThis results in a visible line break (e.g., ",
+	["inline", [
+		["punctuation", "`"],
+		"<br>",
+		["punctuation", "`"]
+	]],
+	") following each line.\r\n\r\n",
+
+	["attributes", [
+		["punctuation", "["],
+		["attr-value", "source"],
+		["punctuation", "]"]
+	]],
+	["title", [
+		["punctuation", "."],
+		"Line breaks preserved using a space followed by the plus sign (",
+		["inline", [
+			["attribute-ref", [
+				["punctuation", "{"],
+				["variable", "plus"],
+				["punctuation", "}"]
+			]]
+		]],
+		")"
+	]],
+	["literal-block", [
+		["punctuation", "----"],
+		"\r\nRubies are red, +\r\nTopazes are blue.\r\n",
+		["punctuation", "----"]
+	]],
+
+	["other-block", [
+		["punctuation", "===="],
+		"\r\nRubies are red, ", ["line-continuation", "+"],
+		"\r\nTopazes are blue.\r\n",
+		["punctuation", "===="]
+	]],
+
+	["attributes", [
+		["punctuation", "["],
+		["attr-value", "source"],
+		["punctuation", "]"]
+	]],
+	["title", [
+		["punctuation", "."],
+		"Line breaks preserved using the hardbreaks option"
+	]],
+	["literal-block", [
+		["punctuation", "----"],
+		"\r\n[%hardbreaks]\r\nRuby is red.\r\nJava is black.\r\n",
+		["punctuation", "----"]
+	]],
+
+	["other-block", [
+		["punctuation", "===="],
+		["attributes", [
+			["punctuation", "["],
+			["attr-value", "%hardbreaks"],
+			["punctuation", "]"]
+		]],
+		"\r\nRuby is red.\r\nJava is black.\r\n",
+		["punctuation", "===="]
+	]],
+
+	"\r\n\r\nTo preserve line breaks throughout your whole document, add the ",
+	["inline", [
+		["punctuation", "`"],
+		"hardbreaks",
+		["punctuation", "`"]
+	]],
+	" attribute to the document's header.\r\n\r\n",
+
+	["title", [
+		["punctuation", "."],
+		"Line breaks preserved throughout the document using the hardbreaks attribute"
+	]],
+	["attributes", [
+		["punctuation", "["],
+		["attr-value", "source"],
+		["punctuation", "]"]
+	]],
+	["literal-block", [
+		["punctuation", "----"],
+		"\r\n= Line Break Doc Title\r\n:hardbreaks:\r\n\r\nRubies are red,\r\nTopazes are blue.\r\n",
+		["punctuation", "----"]
+	]],
+
+	["title", [
+		["punctuation", "==="],
+		" Admonitions"
+	]],
+
+	"\r\n\r\nThere are certain statements you may want to draw attention to by taking them out of the content's flow and labeling them with a priority.\r\nThese are called admonitions.\r\nIt's rendered style is determined by the assigned label (i.e., value).\r\nAsciidoctor provides five admonition style labels:\r\n\r\n",
+
+	["list-punctuation", "*"],
+	["inline", [
+		["punctuation", "`"],
+		"NOTE",
+		["punctuation", "`"]
+	]],
+
+	["list-punctuation", "*"],
+	["inline", [
+		["punctuation", "`"],
+		"TIP",
+		["punctuation", "`"]
+	]],
+
+	["list-punctuation", "*"],
+	["inline", [
+		["punctuation", "`"],
+		"IMPORTANT",
+		["punctuation", "`"]
+	]],
+
+	["list-punctuation", "*"],
+	["inline", [
+		["punctuation", "`"],
+		"CAUTION",
+		["punctuation", "`"]
+	]],
+
+	["list-punctuation", "*"],
+	["inline", [
+		["punctuation", "`"],
+		"WARNING",
+		["punctuation", "`"]
+	]],
+
+	["title", [
+		["punctuation", "."],
+		"Caution vs. Warning"
+	]],
+
+	["attributes", [
+		["punctuation", "["],
+		["attr-value", "#caution-vs-warning"],
+		["punctuation", "]"]
+	]],
+
+	["other-block", [
+		["punctuation", "****"],
+		"\r\nWhen choosing the admonition type, you may find yourself getting confused between \"caution\" and \"warning\" as these words are often used interchangeably.\r\nHere's a simple rule to help you differentiate the two:\r\n\r\n",
+
+		["list-punctuation", "*"],
+		" Use ",
+		["inline", [
+			["bold", [
+				["punctuation", "*"],
+				"CAUTION",
+				["punctuation", "*"]
+			]]
+		]],
+		" to advise the reader to ",
+		["inline", [
+			["italic", [
+				["punctuation", "_"],
+				"act",
+				["punctuation", "_"]
+			]]
+		]],
+		" carefully (i.e., exercise care).\r\n",
+
+		["list-punctuation", "*"],
+		" Use ",
+		["inline", [
+			["bold", [
+				["punctuation", "*"],
+				"WARNING",
+				["punctuation", "*"]
+			]]
+		]],
+		" to inform the reader of danger, harm, or consequences that exist.\r\n\r\nTo find a deeper analysis, see https://www.differencebetween.com/difference-between-caution-and-vs-warning/.\r\n",
+
+		["punctuation", "****"]
+	]],
+
+	"\r\n\r\nWhen you want to call attention to a single paragraph, start the first line of the paragraph with the label you want to use.\r\nThe label must be uppercase and followed by a colon (",
+	["inline", [
+		["punctuation", "`"],
+		":",
+		["punctuation", "`"]
+	]],
+	").\r\n\r\n",
+
+	["title", [
+		["punctuation", "."],
+		"Admonition paragraph syntax"
+	]],
+
+	["attributes", [
+		["punctuation", "["],
+		["attr-value", "source"],
+		["punctuation", "]"]
+	]],
+
+	["literal-block", [
+		["punctuation", "----"],
+		"\r\nWARNING: Wolpertingers are known to nest in server racks. ",
+		["callout", "<1>"],
+		["callout", "<2>"],
+		"\r\nEnter at your own risk.\r\n",
+		["punctuation", "----"]
+	]],
+
+	["callout", "<1>"],
+	" The label must be uppercase and immediately followed by a colon (",
+	["inline", [
+		["punctuation", "`"],
+		":",
+		["punctuation", "`"]
+	]],
+	").\r\n",
+
+	["callout", "<2>"],
+	" Separate the first line of the paragraph from the label by a single space.\r\n\r\n",
+
+	["title", [
+		["punctuation", "."],
+		"Result: Admonition paragraph"
+	]],
+	["other-block", [
+		["punctuation", "===="],
+		["admonition", "WARNING:"],
+		" Wolpertingers are known to nest in server racks.\r\nEnter at your own risk.\r\n",
+		["punctuation", "===="]
+	]],
+
+	"\r\n\r\nAn admonition paragraph is rendered in a callout box with the admonition label--or its corresponding icon--in the gutter.\r\nIcons are enabled by setting the ",
+	["inline", [
+		["punctuation", "`"],
+		"icons",
+		["punctuation", "`"]
+	]],
+	" attribute on the document.\r\n\r\n",
+
+	["admonition", "NOTE:"],
+	" Admonitions can also encapsulate any block content, which we'll cover later.\r\n\r\n",
+
+	["title", [
+		["punctuation", "==="],
+		" Mild punctuation, strong impact"
+	]],
+
+	"\r\n\r\nJust as we emphasize certain words and phrases when we speak, we can emphasize them in text by surrounding them with punctuation.\r\nAsciiDoc refers to this markup as ",
+	["inline", [
+		["italic", [
+			["punctuation", "_"],
+			"quoted text",
+			["punctuation", "_"]
+		]]
+	]],
+	".\r\n\r\n",
+
+	["title", [
+		["punctuation", "===="],
+		" Quoted text"
+	]],
+
+	"\r\n\r\nFor instance, in an e-mail, you might \"",
+	["inline", [
+		["punctuation", "`"],
+		"speak",
+		["punctuation", "`"]
+	]],
+	"\" a word louder by enclosing it in asterisks.\r\n\r\n",
+
+	["attributes", [
+		["punctuation", "["],
+		["attr-value", "source"],
+		["punctuation", "]"]
+	]],
+
+	"\r\nI can't believe it, we ",
+	["inline", [
+		["bold", [
+			["punctuation", "*"],
+			"won",
+			["punctuation", "*"]
+		]]
+	]],
+	"!\r\n\r\nAs you would expect, the asterisks make the text ",
+	["inline", [
+		["bold", [
+			["punctuation", "*"],
+			"won",
+			["punctuation", "*"]
+		]]
+	]],
+	" bold.\r\nYou can almost sense the emotion.\r\nThis is one example of quoted (i.e., formatted) text.\r\n\r\n",
+
+	["admonition", "NOTE:"],
+	" The term \"",
+	["inline", [
+		["punctuation", "`"],
+		"quote",
+		["punctuation", "`"]
+	]],
+	"\" is used liberally here to apply to any symbols that surround text in order to apply emphasis or special meaning.\r\n\r\nHere are the forms of quoted text that AsciiDoc recognizes:\r\n\r\n",
+
+	["title", [
+		["punctuation", "."],
+		"Bold, italic, and monospace formatting syntax"
+	]],
+	["attributes", [
+		["punctuation", "["],
+		["attr-value", "source"],
+		["punctuation", "]"]
+	]],
+	["literal-block", [
+		["punctuation", "----"],
+		"\r\nbold *constrained* & **un**constrained\r\n\r\nitalic _constrained_ & __un__constrained\r\n\r\nbold italic *_constrained_* & **__un__**constrained\r\n\r\nmonospace `constrained` & ``un``constrained\r\n\r\nmonospace bold `*constrained*` & ``**un**``constrained\r\n\r\nmonospace italic `_constrained_` & ``__un__``constrained\r\n\r\nmonospace bold italic `*_constrained_*` & ``**__un__**``constrained\r\n",
+		["punctuation", "----"]
+	]],
+
+	"\r\n\r\nWhen you want to quote text (e.g., place emphasis) somewhere other than at the boundaries of a word, you need to double up the punctuation.\r\n\r\n",
+
+	["title", [
+		["punctuation", "."],
+		"Result: Bold, italic, and monospace text"
+	]],
+
+	["other-block", [
+		["punctuation", "===="],
+
+		"\r\nbold ",
+		["inline", [
+			["bold", [
+				["punctuation", "*"],
+				"constrained",
+				["punctuation", "*"]
+			]]
+		]],
+		" & ",
+		["inline", [
+			["bold", [
+				["punctuation", "**"],
+				"un",
+				["punctuation", "**"]
+			]]
+		]],
+		"constrained\r\n\r\nitalic ",
+		["inline", [
+			["italic", [
+				["punctuation", "_"],
+				"constrained",
+				["punctuation", "_"]
+			]]
+		]],
+		" & ",
+		["inline", [
+			["italic", [
+				["punctuation", "__"],
+				"un",
+				["punctuation", "__"]
+			]]
+		]],
+		"constrained\r\n\r\nbold italic ",
+		["inline", [
+			["bold", [
+				["punctuation", "*"],
+				"_constrained_",
+				["punctuation", "*"]
+			]]
+		]],
+		" & ",
+		["inline", [
+			["bold", [
+				["punctuation", "**"],
+				"__un__",
+				["punctuation", "**"]
+			]]
+		]],
+		"constrained\r\n\r\nmonospace ",
+		["inline", [
+			["punctuation", "`"],
+			"constrained",
+			["punctuation", "`"]
+		]],
+		" & `",
+		["inline", [
+			["punctuation", "`"],
+			"un",
+			["punctuation", "`"]
+		]],
+		["inline", [
+			["punctuation", "`"],
+			"constrained\r\n\r\nmonospace bold `*constrained*",
+			["punctuation", "`"]
+		]],
+		" & `",
+		["inline", [
+			["punctuation", "`"],
+			"**un**",
+			["punctuation", "`"]
+		]],
+		["inline", [
+			["punctuation", "`"],
+			"constrained\r\n\r\nmonospace italic `_constrained_",
+			["punctuation", "`"]
+		]],
+		" & `",
+		["inline", [
+			["punctuation", "`"],
+			"__un__",
+			["punctuation", "`"]
+		]],
+		["inline", [
+			["punctuation", "`"],
+			"constrained\r\n\r\nmonospace bold italic `*_constrained_*",
+			["punctuation", "`"]
+		]],
+		" & `",
+		["inline", [
+			["punctuation", "`"],
+			"**__un__**",
+			["punctuation", "`"]
+		]],
+		"`constrained\r\n",
+
+		["punctuation", "===="]
+	]],
+
+	"\r\n\r\nAny quoted text can be prefixed with an attribute list.\r\nThe first positional attribute is treated as a role.\r\nThe role can be used to apply custom styling to the text.\r\nFor instance:\r\n\r\n",
+
+	["attributes", [
+		["punctuation", "["],
+		["attr-value", "source"],
+		["punctuation", "]"]
+	]],
+
+	"\r\nType the word ",
+	["inline", [
+		["attributes", [
+			["punctuation", "["],
+			["attr-value", ".userinput"],
+			["punctuation", "]"]
+		]],
+		["punctuation", "#"],
+		"asciidoc",
+		["punctuation", "#"]
+	]],
+	" into the search bar.\r\n\r\nWhen converting to HTML, the word \"",
+	["inline", [
+		["punctuation", "`"],
+		"asciidoc",
+		["punctuation", "`"]
+	]],
+	"\" is wrapped in ",
+	["inline", [
+		["punctuation", "`"],
+		"<span>",
+		["punctuation", "`"]
+	]],
+	" tags and the role is used as the element's CSS class:\r\n\r\n",
+
+	["attributes", [
+		["punctuation", "["],
+		["attr-value", "source"],
+		["punctuation", ","],
+		["attr-value", "xml"],
+		["punctuation", "]"]
+	]],
+	"\r\n<span class=\"userinput\">asciidoc</span>\r\n\r\nYou can apply styles to the text using CSS.\r\n\r\nYou may not always want these substitutions to take place.\r\nIn those cases, you'll need to use markup to escape the text."
+]