Warning, /frameworks/syntax-highlighting/autotests/folding/asciidoc.adoc.fold is written in an unsupported language. File is not indexed.
0001 <beginfold id='1'>=</beginfold id='1'> AsciiDoc Syntax Highlighting 0002 // There are multiple level 0 sections, so use book instead of article. 0003 :doctype: book 0004 // For nice admonition and callout icons. 0005 :icons: font 0006 :toc: left 0007 0008 Testing the syntax highlighting support in KDE Frameworks. 0009 0010 The first of the following sections lists the things that are known not to work. 0011 Further sections are intended for testing the supported features of AsciiDoc. 0012 0013 0014 <endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Known Not to Work 0015 0016 There are a couple of things that are known not to work. 0017 0018 0019 <beginfold id='1'>==</beginfold id='1'> Block 0020 0021 * Highlighting of attributes inside a block title. 0022 0023 * Highlighting of formatted text inside a block title other than ... 0024 ** #marked# 0025 ** `monospaced` 0026 0027 * Code folding for contiguous blocks. 0028 + 0029 This has an advantage too, though. 0030 It enables the user to decide on having code folding or not. 0031 For short blocks without empty lines where no code folding is desired, use contiguous blocks. 0032 For longer blocks which should support code folding, use delimited blocks. 0033 0034 * https://asciidoctor.org/docs/user-manual/#discrete-headings[Discrete headings] inside block. 0035 + 0036 <beginfold id='2'>-----</beginfold id='2'> 0037 **** 0038 Some text. 0039 0040 [discrete] 0041 === Discrete Heading 0042 0043 Some more text. 0044 **** 0045 <endfold id='2'>-----</endfold id='2'> 0046 + 0047 Syntax highlighting does not recognize discrete headings inside a block. 0048 If a normal section title is marked as being discrete, highlighting works. 0049 0050 0051 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Custom Styles 0052 0053 * Highlighting of formatted text within the phrase to be styled. 0054 + 0055 Some [big]#big and *strong*# text. 0056 0057 * Highlighting of styles with a phrase that spans multiple lines. 0058 + 0059 <beginfold id='2'>----</beginfold id='2'> 0060 [big]#this 0061 is 0062 not 0063 highlighted# 0064 <endfold id='2'>----</endfold id='2'> 0065 0066 0067 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Formatted/Quoted Text 0068 0069 * Highlighting of formatted/quoted text (e.g. monospaced) that spans multiple lines. 0070 0071 * Highlighting combinations besides those of emphasized, strong and monospaced. 0072 ** Attributes inside other formatting. 0073 + 0074 `{attribute-id} inside monospaced` 0075 0076 ** Passthrough inside other formatting. 0077 + 0078 `+passthrough+ inside monospaced` 0079 0080 ** Marked text inside other formatting. 0081 + 0082 `#marked# inside monospaced` 0083 0084 ** Subscript inside other formatting. 0085 + 0086 `~sub~script inside monospaced` 0087 0088 ** Superscript inside other formatting. 0089 + 0090 `^super^script inside monospaced` 0091 0092 And even more complex combinations. 0093 0094 0095 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> List 0096 0097 * Inside a list, indented lines without leading asterisks or hyphen start highlighting for a verbatim paragraph. 0098 Asciidoctor renders this as normal text. 0099 0100 0101 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Macro 0102 0103 * Highlighting of macros with a text argument that spans multiple lines. 0104 + 0105 <beginfold id='2'>----</beginfold id='2'> 0106 xref:id[this works just fine] 0107 0108 xref:id[ 0109 highlighting a macro with 0110 a text that spans multiples 0111 does not work 0112 ] 0113 <endfold id='2'>----</endfold id='2'> 0114 0115 0116 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Quote, Verse 0117 0118 * Highlighting for single quote symbol `"`. 0119 + 0120 Highlighting for air quotes `""` is supported. 0121 0122 * Highlighting for Markdown style quotes. 0123 0124 0125 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Replacement 0126 0127 Highlighting for replacements is limited to those listed in the https://asciidoctor.org/docs/user-manual/#replacements[Asciidoctor Manual] and numerical character references. 0128 0129 Highlighting for other https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references[HTML/XML character references] is not supported. 0130 0131 .Examples of supported references 0132 * `+(C)+` resulting in (C) 0133 * `+=>+` resulting in => 0134 * `+¼+` resulting in ¼ 0135 0136 .Examples of references that are not supported 0137 * `+¼+` resulting in ¼ 0138 * `+φ+` resulting in φ 0139 0140 0141 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Section 0142 0143 * Setext style for section titles. 0144 + 0145 Only Atx style is supported. 0146 + 0147 NOTE: Asciidoctor's https://asciidoctor.org/docs/asciidoc-recommended-practices/[recommended practices] states _not_ to use Setext style for section titles. 0148 0149 * Highlighting of formatted/quoted text inside section title other than ... 0150 ** #marked# 0151 ** `monospaced` 0152 0153 0154 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Table 0155 0156 * Highlighting of tables with custom separator. 0157 ** The custom separator will _not_ be highlighted. 0158 ** All `|` inside the table _will be falsly_ highlighted. 0159 0160 * Highlighting of delimiter-separated tables. 0161 ** Table delimiters in shorthand notation and the value separator will _not_ be highlighted. 0162 ** All `|` inside the table _will be falsly_ highlighted. 0163 0164 * Applying styles on table contents. 0165 + 0166 When defining a table, individual columns or cells can be defined to be highlighted *strong* etc.. 0167 Corresponding highlighting of these cells does not work. 0168 0169 0170 0171 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Admonition 0172 0173 <beginfold id='1'>==</beginfold id='1'> Simple Format 0174 0175 NOTE: A simple note. 0176 0177 Some text. 0178 NOTE: This is not a separate note as it is part of the paragraph started with the line above. 0179 0180 NOTE:This is not a note as there is no space after the `:`. 0181 0182 NOTE: This is not a note as it is indented. 0183 0184 NOTE : This is not a note as there are spaces between `NOTE` and `:`. 0185 0186 NOTE: 0187 This is not a note as it is not using block format and the text is not starting on the same line as the label. 0188 0189 NOTE: This is a lengthy note in simple format. 0190 Second line. 0191 One more line. 0192 And another one. 0193 This is the last line. 0194 0195 This line is not part of the simple note anymore. 0196 0197 CAUTION: This is a CAUTION. 0198 0199 IMPORTANT: This is IMPORTANT. 0200 0201 TIP: This is a TIP. + 0202 This second line is rendered as a line on its own because of the trailing `+` in the first line. 0203 0204 WARNING: This is a WARNING. 0205 0206 0207 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Block Format 0208 0209 .Contiguous 0210 [NOTE] 0211 [[contiguous-note-id]] 0212 This is a contiguous *note* block. 0213 Second line. 0214 And one more line. 0215 // comment inside block 0216 This is the final line. 0217 0218 This line is not part of the contiguous note block anymore. 0219 0220 .Delimited 0221 [NOTE] 0222 [[delimited-note-id]] 0223 <beginfold id='2'>====</beginfold id='2'> 0224 This is a *note* in block format. 0225 As a block, the note may have a title 0226 // comment inside block 0227 0228 In block format, multiple lines, paragraphs etc. are possible. 0229 <endfold id='2'>====</endfold id='2'> 0230 0231 There is no delimited admonition block without block name. 0232 Using `====` delimiter without a block name results in an example block. 0233 0234 .Using open block 0235 [NOTE] 0236 <beginfold id='2'>--</beginfold id='2'> 0237 Inside the open block note. 0238 <endfold id='2'>--</endfold id='2'> 0239 0240 0241 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> [[main-1]]An[[main-2]]chor[[main-3]] and Cross Reference 0242 0243 <beginfold id='1'>==</beginfold id='1'> [[section-1]][[section-2]] An[[section-3]][[section-4]]chor[[section-5]] 0244 0245 [[isolated-anchor]] 0246 Isolated anchor. 0247 0248 [[isolated-anchor-with-label,Isolated Anchor With Label]] 0249 Isolated anchor with label. 0250 0251 This line has an [[inline-anchor, Inline Anchor]]anchor placed inside the text. 0252 0253 [#isolated-shorthand] 0254 Isolated anchor using shorthand definition. 0255 0256 [#isolated-shorthand, Isolated Shorthand Anchor] 0257 Isolated anchor with label using shorthand definition. 0258 0259 This line has an [ #inline-shorthand ]#anchor placed inside the text# #. 0260 0261 .Inside [[block-anchor]]block title 0262 Works too. 0263 0264 .Macro form 0265 There is also a maanchor:anchor-id[Macro Anchor]cro form for anchor definition. 0266 0267 NOTE: There is no space needed before the `anchor` macro name. 0268 Also not after the closing `]`. 0269 0270 0271 <beginfold id='1'>===</beginfold id='1'> Not an anchor 0272 0273 [[ not-an-anchor]] 0274 because of the space after the opening brackets. 0275 0276 [[not-an-anchor ]] 0277 because of the space before the closing brackets. 0278 0279 [[not-an-anchor]] because of line starting with spaces. 0280 0281 [#not-an-anchor]#because# of line starting with spaces. 0282 0283 [#not-an-anchor] because of trailing text. 0284 0285 Not an anchor because of leading text [#not-an-anchor] 0286 0287 Also[#not-an-anchor]#some text# because of missing space before `[`. 0288 0289 Also [#not-an-anchor] #some text# because of space after `]`. 0290 0291 Also [#not-an-anchor]# some text# because of space after the leading `#`. 0292 0293 Also [#not-an-anchor]because of missing referred text (e.g. `#some text#`). 0294 0295 0296 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Escaped 0297 0298 This is an escaped \[[anchor-id, some #anchor# label]] anchor. 0299 0300 This is just some \normal text. 0301 0302 Some\[[anchor-id]]anchor. 0303 0304 \[[anchor-id]] 0305 0306 <beginfold id='3'>////</beginfold id='3'> 0307 FIXME: highlighting differs 0308 Asciidoctor seems to just pass through the anchor when escaping it. 0309 This behaviour is rather unexpected, as in other cases the escaped contents is subject to further highlighting. 0310 0311 We currently only consume the opening bracket. 0312 <endfold id='3'>////</endfold id='3'> 0313 This is an escaped \[#shorthand-id]#anchor in shorthand form#. 0314 0315 Some \[#shorthand-id]. 0316 0317 \[#shorthand-id] 0318 0319 \[#shorthand-id]# 0320 0321 0322 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Cross References 0323 0324 <<main-1>> 0325 0326 <<main-2>> 0327 0328 <<main-3>> 0329 0330 <<section-1>> 0331 0332 This is a reference to <<section-2>>. 0333 0334 <<section-3>> some text >> some more text 0335 0336 some << text <<<section-4>>> 0337 0338 <<section-5>> 0339 0340 <<isolated-anchor>> 0341 0342 <<isolated-anchor-with-label>> 0343 0344 <<inline-anchor>> 0345 0346 <<isolated-shorthand>> 0347 0348 <<inline-shorthand>>. 0349 0350 <<block-anchor>> 0351 0352 0353 <beginfold id='1'>===</beginfold id='1'> Escaped 0354 0355 This is not a reference \<<section-1>>. 0356 0357 0358 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Attribute 0359 0360 <beginfold id='1'>==</beginfold id='1'> No Value 0361 0362 :some-attribute: 0363 This line should not be highlighted. 0364 0365 :not-an-attribute: as the line is indented. 0366 0367 0368 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Single Line Value 0369 0370 Attributes with values that are rendered as a single line, even if their definition spans multiple lines. 0371 0372 .Single line definition 0373 :single-line: only one line 0374 This line is not part of the attribute value anymore. 0375 0376 ##before##{single-line}##after## 0377 0378 :attr-in-attr-value: in multi line definition 0379 0380 .Multi line definition 0381 :single-line-continued: First line {attr-in-attr-value}. \ 0382 Second line. \ 0383 Another line. 0384 This line is not part of the attribute value anymore. 0385 0386 ##before##{single-line-continued}##after## 0387 0388 IMPORTANT: At least one space is needed before the continuation `\`. 0389 0390 .Line continuation is only highlighted when inside an attribute definition 0391 some \ 0392 text 0393 0394 0395 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Multi Line Value 0396 0397 Attributes with values including hard line breaks. 0398 0399 IMPORTANT: At least one space is needed before the continuation `+` and between the `+` and the `\`. 0400 0401 :multi-line: First line. + \ 0402 Second line. + \ 0403 Third line. 0404 This line is not part of the attribute value anymore. 0405 0406 ##before##{multi-line}##after## 0407 0408 0409 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Inline Definition 0410 0411 Inline attribute definitions {set:inline-attribute:just fine} works {inline-attribute}. 0412 0413 .Surplus `:` is part of the value 0414 {set:attr::some value} 0415 {attr} 0416 0417 {set:attr} 0418 {attr} 0419 0420 .Not an inline definition as leading `set:` is missing 0421 {single-line:some value} 0422 0423 0424 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Unsetting 0425 0426 :!_custom_2-: 0427 :_custom_2-!: 0428 0429 .Adding a value when unsetting doesn't make sense, but doesn't hurt either 0430 :some-attribute: some value 0431 Attribute is set to `{some-attribute}`. 0432 0433 :!some-attribute: some value 0434 {some-attribute} is not set anymore. 0435 0436 0437 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Not an Attribute 0438 0439 :not-an-attribute:as there is no space after the terminating column of the identifier 0440 0441 :not-an-attribute: as it is indented 0442 0443 0444 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Combination with Other Highlighting 0445 0446 <beginfold id='2'>****</beginfold id='2'> 0447 :inside-a-block: inside a block 0448 Using an attribute {inside-a-block} works too. 0449 <endfold id='2'>****</endfold id='2'> 0450 0451 :inside-formatting: inside formatting 0452 An attribute used `{inside-formatting}` is not highlighting as attribute. 0453 0454 0455 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Escaped 0456 0457 \:attr-1: escaped attribute definition + \ 0458 second line of escaped attribute definition 0459 0460 \:!attr-1: escaped unset attribute 0461 0462 \:-attr-1: this is not highlighted as escaped attribute definition as it has an invalid attribute id. 0463 0464 This \:attr-1: is not highlighted as escaped attribute definition as it is not used at line start. 0465 0466 :attr-1: some attribute 0467 This is not rendered as \{attr-1}. 0468 0469 This is not an inline attribute definition \{set:attr-2:some other attribute}. + 0470 {attr-2} is not set. 0471 0472 <beginfold id='2'>****</beginfold id='2'> 0473 :inside-a-block: inside a block 0474 Escaping an attribute \{inside-a-block} works too. 0475 <endfold id='2'>****</endfold id='2'> 0476 0477 0478 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Bibliography 0479 0480 <beginfold id='1'>==</beginfold id='1'> Using References 0481 0482 The first reference has no label, so its id <<ref-1>> is rendered. 0483 0484 The second reference has number <<r2>> as label. 0485 0486 The third reference has <<r3>> as label. 0487 0488 A reference definition inside the text instead of the bibliography section yields some strange result: [[[ref-o,outside bibliography]]]]. 0489 Not sure what to do with this. 0490 0491 This is trying to use the escaped reference <<r4>>. 0492 0493 This is trying to use reference <<r6>>. 0494 0495 0496 [bibliography] 0497 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> References 0498 0499 - [[[ref-1]]] This is reference 1. 0500 - [[[r2,2]]]This is reference 2. 0501 - [[[r3,Some Text]]] 0502 This is reference 3. 0503 - [\[[r4, escaped]]] This is #escaped#. 0504 - [[[r5,5]]] This is reference 5. 0505 * [[[r6,strange]]] Using an asterisk yields a strange result. 0506 0507 0508 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Block 0509 0510 [abstract] 0511 .Abstract - contiguous block 0512 This document is used for testing syntax highlighting regarding various types of blocks. 0513 E.g. this contiguous abstract block. + 0514 Using block form for the abstract seems to be rendered differently than the section form (see `section.adoc`). 0515 0516 [abstract] 0517 .Abstract - delimited open block 0518 <beginfold id='2'>--</beginfold id='2'> 0519 Using the delimited block form ... 0520 0521 enables having empty lines in the abstract. 0522 <endfold id='2'>--</endfold id='2'> 0523 0524 0525 <beginfold id='1'>==</beginfold id='1'> General 0526 0527 NOTE: Starting and ending delimiter must be balanced, meaning they must have the same length. 0528 0529 .Block title #before# block meta data 0530 [literal] 0531 <beginfold id='2'>....</beginfold id='2'> 0532 Inside the block. 0533 <endfold id='2'>....</endfold id='2'> 0534 0535 [literal] 0536 .Block title `after` block meta data 0537 <beginfold id='2'>....</beginfold id='2'> 0538 Inside the block. 0539 <endfold id='2'>....</endfold id='2'> 0540 0541 .Invalid block name 0542 [ literal] 0543 <beginfold id='2'>....</beginfold id='2'> 0544 This block has invalid meta data as there is a space between the opening square bracket and the block name. 0545 <endfold id='2'>....</endfold id='2'> 0546 0547 .Block with attributes 0548 [literal, some, attributes] 0549 <beginfold id='2'>....</beginfold id='2'> 0550 Inside the block. 0551 <endfold id='2'>....</endfold id='2'> 0552 0553 .Anchor before block name for contiguous block 0554 [[contiguous_block_id_before_name]] 0555 [literal] 0556 Inside the block. 0557 0558 .Anchor after block name for contiguous block 0559 [literal] 0560 [[contiguous_block_id_after_name]] 0561 Inside the block. 0562 0563 .Anchor after block name for delimited block 0564 [literal] 0565 [#delimited_block_id] 0566 <beginfold id='2'>....</beginfold id='2'> 0567 Inside the block. 0568 <endfold id='2'>....</endfold id='2'> 0569 0570 .Option definition 0571 [literal%some-option, some, attributes] 0572 Inside the block. 0573 0574 .Shorthand anchor definition 0575 // TODO Would be nice if we could highligth the shorthand ID definition as such. 0576 [literal#shorthand-id, some, attributes] 0577 Inside the block. 0578 0579 Link to <<contiguous_block_id_before_name>>. 0580 0581 Link to <<contiguous_block_id_after_name>>. 0582 0583 Link to <<shorthand-id>>. 0584 0585 0586 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Admonition 0587 0588 See `admonition.adoc`. 0589 0590 0591 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Comment 0592 0593 See `comment.adoc`. 0594 0595 0596 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Example 0597 0598 .Contiguous 0599 [example] 0600 [[example-block-id]] 0601 A countiguous *example* block. 0602 // some comment 0603 Second line of the example block. 0604 0605 This line is not part of the contiguous example block anymore. 0606 0607 .Delimited with block name 0608 [example] 0609 // some comment 0610 [[example-block-id]] 0611 // some comment 0612 <beginfold id='2'>====</beginfold id='2'> 0613 // some comment 0614 Inside the delimited example block. 0615 <endfold id='2'>====</endfold id='2'> 0616 0617 .Delimited without block name 0618 [[example-block-id]] 0619 <beginfold id='2'>====</beginfold id='2'> 0620 Inside the delimited example block. 0621 <endfold id='2'>====</endfold id='2'> 0622 0623 .Using an open block 0624 [example] 0625 [[example-block-id]] 0626 <beginfold id='2'>--</beginfold id='2'> 0627 Inside the open block example. 0628 <endfold id='2'>--</endfold id='2'> 0629 0630 0631 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Fenced 0632 0633 NOTE: According to the https://asciidoctor.org/docs/user-manual/#built-in-blocks-summary[Asciidoctor manual], fenced blocks do not support block names. 0634 0635 .Delimited without block name 0636 [#fenced-block-id] 0637 <beginfold id='2'>```</beginfold id='2'> 0638 Inside the fenced block. 0639 The block contents is rendered verbatim. 0640 So there is *no* text formatting. 0641 <endfold id='2'>```</endfold id='2'> 0642 0643 .This is not a fenced block 0644 `````` 0645 A fenced block's delimiter length is _exactly_ 3. 0646 `````` 0647 0648 0649 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Listing 0650 0651 .Contiguous 0652 [listing] 0653 [[listing-block-id]] 0654 A countiguous *listing* block. 0655 Last line of the listing. 0656 0657 This line is not part of the contiguous block anymore. 0658 0659 .Delimited with block name 0660 [listing] 0661 [[listing-block-id]] 0662 // comment before the opening block delimiter 0663 <beginfold id='3'>////</beginfold id='3'> 0664 block comment 0665 <endfold id='3'>////</endfold id='3'> 0666 <beginfold id='2'>----</beginfold id='2'> 0667 First line inside the *listing* block. 0668 Last line inside the block. 0669 <endfold id='2'>----</endfold id='2'> 0670 0671 .Delimited without block name 0672 [[listing-block-id]] 0673 <beginfold id='2'>----</beginfold id='2'> 0674 Inside the delimited listing block. 0675 <endfold id='2'>----</endfold id='2'> 0676 0677 .Using an open block 0678 [listing] 0679 [[listing-block-id]] 0680 <beginfold id='2'>--</beginfold id='2'> 0681 Inside the open block listing. 0682 <endfold id='2'>--</endfold id='2'> 0683 0684 0685 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Literal 0686 0687 .Contiguous 0688 [literal] 0689 // some comment 0690 [[literal-block-id]] 0691 // some comment 0692 Inside the contiguous literal block. 0693 // this should not be highlighted as comment 0694 .this should not be highlighted as title 0695 The block contents is rendered verbatim. 0696 So there is *no* text formatting. 0697 // this should not be highlighted as comment 0698 0699 This line is not part of the contiguous block anymore. 0700 0701 .Delimited with block name 0702 [literal] 0703 // some comment 0704 [#literal-block-id] 0705 // some comment 0706 <beginfold id='2'>..........</beginfold id='2'> 0707 Inside the delimited literal block. 0708 // this should not be highlighted as comment 0709 .this should not be highlighted as title 0710 <endfold id='2'>..........</endfold id='2'> 0711 0712 .Delimited without block name 0713 [[literal-block-id]] 0714 // some comment 0715 <beginfold id='2'>..........</beginfold id='2'> 0716 Inside the delimited literal block. 0717 <endfold id='2'>..........</endfold id='2'> 0718 0719 .Using an open block 0720 [literal] 0721 // some comment 0722 [[literal-block-id]] 0723 // some comment 0724 <beginfold id='2'>--</beginfold id='2'> 0725 // this should not be highlighted as comment 0726 Inside the open block listing. 0727 <endfold id='2'>--</endfold id='2'> 0728 0729 .Using leading spaces for first line 0730 When using some leading spaces, the whole paragraph is treated as literal. 0731 Only the first line needs to have leading spaces. 0732 0733 This line is not part of the literal paragraph anymore. 0734 0735 0736 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Open 0737 0738 NOTE: The open block does not have a contiguous form. 0739 0740 .Delimited 0741 [#open-block-id] 0742 <beginfold id='2'>--</beginfold id='2'> 0743 An open block's delimiter length is _exactly_ 2. 0744 0745 Last line of the #open# block. 0746 <endfold id='2'>--</endfold id='2'> 0747 0748 0749 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Passthrough 0750 0751 .Contiguous 0752 [pass] 0753 [[contiguous-passthrough-id]] 0754 Inside the contiguous passthrough block. 0755 Second line to pass trhough. 0756 0757 This line is not part of the contiguous passthrough block anymore. 0758 0759 .Delimited with block name 0760 [pass] 0761 [[delimited-passthrough-id]] 0762 <beginfold id='2'>++++++</beginfold id='2'> 0763 Inside the delimited passthrough block with block name. 0764 <endfold id='2'>++++++</endfold id='2'> 0765 0766 .Delimited without block name 0767 [[delimited-passthrough-id]] 0768 <beginfold id='2'>++++</beginfold id='2'> 0769 Inside the delimited passthrough block without block name. 0770 <endfold id='2'>++++</endfold id='2'> 0771 0772 According to the https://asciidoctor.org/docs/user-manual/#built-in-blocks-summary[Asciidoctor Manual], passthrough using an open block is not supported. 0773 0774 0775 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Quote 0776 0777 See `quote_verse.adoc`. 0778 0779 0780 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Sidebar 0781 0782 .Contiguous 0783 [sidebar] 0784 [[sidebar-block-id]] 0785 Inside the *sidebar* block. 0786 Second line of the sidebar block. 0787 0788 This line is not part of the sidbar block anymore. 0789 0790 .Delimited with block name 0791 [sidebar] 0792 [[sidebar-block-id]] 0793 <beginfold id='2'>**********</beginfold id='2'> 0794 Inside the *sidebar* block. 0795 <endfold id='2'>**********</endfold id='2'> 0796 0797 .Delimited without block name 0798 [[sidebar-block-id]] 0799 <beginfold id='2'>****</beginfold id='2'> 0800 Inside the sidebar block. 0801 <endfold id='2'>****</endfold id='2'> 0802 0803 .Using an open block 0804 [sidebar] 0805 [[sidebar-block-id]] 0806 <beginfold id='2'>--</beginfold id='2'> 0807 Inside the sidebar block. 0808 <endfold id='2'>--</endfold id='2'> 0809 0810 0811 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Source 0812 0813 .Contiguous 0814 [source,ruby] 0815 [[source-block-id]] 0816 #This is Ruby source code. 0817 #NOTE: If there is a space after the `#`, Asciidoctor interprets this as a section title. 0818 #Seems in contiguous source blocks, Asciidoctor still interprets the block contents, which is rather unexpected. 0819 import 'needed' 0820 IO.puts "hello" 0821 0822 .Contiguous using option syntax 0823 [source%mixed,php] 0824 <p> 0825 <?php echo "Hello, World!"; ?> 0826 </p> 0827 0828 .Delimited with block name 0829 [source , ruby ] 0830 [[source-block-id]] 0831 <beginfold id='2'>----</beginfold id='2'> 0832 # This is Ruby source code. 0833 # NOTE: in delimited source blocks, having a space after the `#` in the comment is OK. 0834 import 'needed' 0835 0836 IO.puts "hello" 0837 <endfold id='2'>----</endfold id='2'> 0838 0839 .Delimited with block name using option syntax 0840 [source%mixed,php] 0841 <beginfold id='2'>----</beginfold id='2'> 0842 <p> 0843 <?php echo "Hello, World!"; ?> 0844 </p> 0845 <endfold id='2'>----</endfold id='2'> 0846 0847 .Delimited with block name using option syntax on next line 0848 [source] 0849 [options="nowrap"] 0850 <beginfold id='2'>----</beginfold id='2'> 0851 <p> 0852 <?php echo "Hello, World!"; ?> 0853 </p> 0854 <endfold id='2'>----</endfold id='2'> 0855 0856 .Delimited without block name 0857 [[source-block-id]] 0858 <beginfold id='2'>----</beginfold id='2'> 0859 # This is Ruby source code. 0860 # NOTE: in delimited source blocks, having a space after the `#` in the comment is OK. 0861 import 'needed' 0862 0863 IO.puts "hello" 0864 <endfold id='2'>----</endfold id='2'> 0865 0866 .Using an open block 0867 [source,ruby] 0868 [[source-block-id]] 0869 <beginfold id='2'>--</beginfold id='2'> 0870 import 'needed' 0871 0872 IO.puts "hello" 0873 <endfold id='2'>--</endfold id='2'> 0874 0875 0876 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Stem 0877 0878 .Contiguous 0879 [stem] 0880 [[stem-block-id]] 0881 Inside the contiguous stem block. 0882 Second line to pass. 0883 0884 This line is not part of the contiguous Passthrough block anymore. 0885 0886 .Delimited with block name 0887 [stem] 0888 [[stem-block-id]] 0889 <beginfold id='2'>++++++</beginfold id='2'> 0890 Inside the delimited stem block with block name. 0891 <endfold id='2'>++++++</endfold id='2'> 0892 0893 .Delimited without block name 0894 [[stem-block-id]] 0895 <beginfold id='2'>++++</beginfold id='2'> 0896 Inside the delimited stem block without block name. 0897 <endfold id='2'>++++</endfold id='2'> 0898 0899 0900 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Table 0901 0902 See `table.adoc`. 0903 0904 0905 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Verse 0906 0907 .Contiguous 0908 [verse] 0909 [[verse-block-id]] 0910 Inside the *verse* block. 0911 Second line of the verse block. 0912 0913 This line is not part of the contiguous verse block anymore. 0914 0915 .Delimited with block name 0916 [verse] 0917 [[verse-block-id]] 0918 <beginfold id='2'>____</beginfold id='2'> 0919 Inside the *verse* block. 0920 <endfold id='2'>____</endfold id='2'> 0921 0922 .Delimited without block name 0923 This would be rendered as a quote block as the same delimiters are used. 0924 0925 .Using an open block 0926 [verse] 0927 [[verse-block-id]] 0928 <beginfold id='2'>--</beginfold id='2'> 0929 Inside the *verse* block. 0930 <endfold id='2'>--</endfold id='2'> 0931 0932 0933 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Nested Blocks 0934 0935 <beginfold id='2'>====</beginfold id='2'> 0936 Start of outer example block. 0937 0938 .Nested example block 0939 <beginfold id='2'>=====</beginfold id='2'> 0940 Inside the inner example block. 0941 // some comment 0942 0943 .Nested literal block 0944 [literal] 0945 // some comment 0946 <beginfold id='2'>----</beginfold id='2'> 0947 Inside the literal block within the inner example block. 0948 -- 0949 Trying to use a block within a verbatim block results in verbatim text, of course. 0950 -- 0951 <endfold id='2'>----</endfold id='2'> 0952 <endfold id='2'>=====</endfold id='2'> 0953 Line in outer block. 0954 [listing] 0955 <beginfold id='2'>----</beginfold id='2'> 0956 Inside the inner listing block. 0957 <endfold id='2'>----</endfold id='2'> 0958 End of outer block. 0959 <endfold id='2'>====</endfold id='2'> 0960 0961 .Admonition inside some other block 0962 <beginfold id='2'>====</beginfold id='2'> 0963 Some text. 0964 0965 NOTE: This is a note in simple format inside a block. 0966 0967 Some more text. 0968 <endfold id='2'>====</endfold id='2'> 0969 0970 0971 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Callout 0972 // Add `:icons: font` for nice callout icons. 0973 0974 Callouts are usually used with listing/source blocks, but Asciidoctor renders them also without a listing block. 0975 0976 <1> This is a callout. 0977 <.> This is a callout too. 0978 0979 <2> This is not rendered as a callout as it is indented. 0980 0981 The line below is not rendered as a callout as it has no text in the same line. 0982 0983 <3> 0984 0985 The line below is not rendered as callout as it is part of this paragraph. 0986 <4> This should _not_ be highlighted as callout. 0987 0988 .Callouts with manual numbering 0989 [source,sh] 0990 <beginfold id='2'>----</beginfold id='2'> 0991 ls -l <2> 0992 ls -la <1> 0993 <endfold id='2'>----</endfold id='2'> 0994 <1> Explanation for callout number 1. 0995 <2> Explanation for callout number 2. 0996 \<3> This is not a callout as it is escaped. 0997 0998 .Callouts with automatic numbering 0999 [source,sh] 1000 <beginfold id='2'>----</beginfold id='2'> 1001 ls -l <.> 1002 ls -la <.> 1003 <endfold id='2'>----</endfold id='2'> 1004 <.> Explanation for callout number 1. 1005 <.> Explanation for callout number 2. 1006 1007 1008 <endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Comment 1009 1010 TIP: Comment highlighting supports the standard https://cgit.kde.org/syntax-highlighting.git/tree/data/syntax/alert.xml[KDE alerts] (TODO, FIXME, ...) in both single-line and multi-line comments. 1011 1012 1013 <beginfold id='1'>==</beginfold id='1'> Single Line 1014 1015 Single-line comments start with exactly `//`. 1016 If there are any characters - including spaces - before the `//`, the line will be rendered. 1017 If there are more than two consecutive `/`, the line will be rendered. 1018 1019 This line // will be rendered completely. 1020 1021 // This line will be rendered as verbatim text as it is indented. 1022 1023 /// This line will be rendered as it starts with 3 `/`. 1024 1025 // This line will be invisible. 1026 1027 //This line will be invisible. 1028 1029 // 1030 1031 \// Escaped comment. 1032 1033 \// TODO Of course there is no alert highlighting in escaped comments. 1034 1035 .Alerts 1036 // NOTE testing alerts 1037 // TEST: testing alerts 1038 // TODO: testing alerts 1039 // TASK testing alerts 1040 // WARNING: testing alerts 1041 // ALERT: testing alerts 1042 // DANGER: testing alerts 1043 1044 1045 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Multi Line 1046 1047 .Contiguous block 1048 [comment] 1049 Some comment. 1050 Alerts: 1051 NOTE testing alerts 1052 TEST: testing alerts 1053 TODO: testing alerts 1054 TASK testing alerts 1055 WARNING: testing alerts 1056 ALERT: testing alerts 1057 DANGER: testing alerts 1058 Last line of contiguous block comment. 1059 1060 This line is not part of the contiguous block comment anymore. 1061 1062 .Delimited block without name 1063 <beginfold id='3'>//////</beginfold id='3'> 1064 This is a multi-line comment. 1065 It spans multiple lines. 1066 1067 Alerts: 1068 NOTE testing alerts 1069 TEST: testing alerts 1070 TODO: testing alerts 1071 TASK testing alerts 1072 WARNING: testing alerts 1073 ALERT: testing alerts 1074 DANGER: testing alerts 1075 1076 This is the comment's last line. 1077 <endfold id='3'>//////</endfold id='3'> 1078 1079 [comment] 1080 .Delimited block with name 1081 <beginfold id='3'>////</beginfold id='3'> 1082 This is a multi-line comment. 1083 It spans multiple lines. 1084 1085 Alerts: 1086 NOTE testing alerts 1087 TEST: testing alerts 1088 TODO: testing alerts 1089 TASK testing alerts 1090 WARNING: testing alerts 1091 ALERT: testing alerts 1092 DANGER: testing alerts 1093 1094 This is the comment's last line. 1095 <endfold id='3'>////</endfold id='3'> 1096 1097 .Using open block 1098 [comment] 1099 -- 1100 Inside the open block comment. 1101 -- 1102 1103 1104 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Counter 1105 1106 <beginfold id='1'>==</beginfold id='1'> Use and Render 1107 1108 .Start with 1 and render value 1109 New value for `c1` is {counter:c1}. 1110 1111 .Increment and render 1112 And now it is {counter:c1}. 1113 1114 .Render the current value without changing it 1115 Current value is {c1}. 1116 1117 1118 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Use Without Rendering 1119 1120 .Define the new counter 1121 No new value to be {counter2:c2}seen. 1122 1123 .Let's see the current value 1124 Current value is {c2}. 1125 1126 .Increment 1127 No incremented value to be {counter2:c2}seen. 1128 1129 .Let's see the current value 1130 Current value is {c2}. 1131 1132 1133 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Using a Start Value 1134 1135 .Start with 3 and render value 1136 New value for `c3` is {counter:c3:99}. 1137 1138 .Increment and render 1139 And now it is {counter:c3}. 1140 1141 .Works with characters too 1142 New value for `c4` is {counter:c4:X} 1143 1144 .Increment character counter and render 1145 And now it is {counter:c4}. 1146 1147 1148 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> About using Spaces 1149 1150 CAUTION: If you leave spaces after the `:` or before the closing `}`, Asciidoctor will make them part of the counter attribute name. + 1151 So it's probably wise to avoid spaces here. 1152 1153 .Define a counter 1154 New value is {counter:c5}. 1155 1156 .This is actually a new counter 1157 New value is {counter: c5}. 1158 1159 .But you can't access that attribute 1160 Can't just show the current value { c5} 1161 1162 .Only if we increment it 1163 Incremented value is {counter: c5}. 1164 1165 .This is again a new counter 1166 New value is {counter: c5}. 1167 1168 .This is also a new counter 1169 New value is {counter:c5 }. 1170 1171 CAUTION: Similar problems occur when using spaces around starting values. + 1172 *Just don't use spaces*. 1173 1174 .New counter with start value 1175 New value is {counter:c6: 9 } 1176 1177 .But when trying to increment 1178 Incremented value is {counter:c6} 1179 1180 1181 1182 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Text Formatting 1183 1184 TIP: Asciidoctor uses also the term _quoted text_. 1185 1186 <beginfold id='1'>==</beginfold id='1'> Custom Styles 1187 1188 [big]#big text# 1189 1190 Some [.big]#big text#. 1191 1192 Some [big]#big and *strong* text#. 1193 1194 Some text with [foo]#custom style#. 1195 1196 [foo bar]#foo bar text# 1197 1198 before![big]#big text# 1199 1200 [big]#big text#!after 1201 1202 [big]##*text*## 1203 1204 <beginfold id='3'>////</beginfold id='3'> 1205 FIXME Highlighting differs. 1206 The phrase is rendered as marked. 1207 The trailing hash is therefore not visible. 1208 <endfold id='3'>////</endfold id='3'> 1209 [big]###text### 1210 1211 [fo[o]#some text# 1212 1213 1214 [underline]_emphasized and underlined_ 1215 1216 [underline]__emphasized and underlined_ 1217 1218 1219 [underline]`monospaced and underlined` 1220 1221 [underline]``monospaced and underlined`` 1222 1223 1224 [underline]*strong and underlined* 1225 1226 [underline]**strong and underlined** 1227 1228 1229 <beginfold id='1'>===</beginfold id='1'> Not rendered as custom style 1230 1231 [fo]o]#not a custom style# because of surplus `]`. 1232 1233 [big]not a phrase because of missing phrase markers. 1234 1235 [big]# # because only spaces used as phrase. 1236 1237 [big]# the phrase# because of leading space in phrase. 1238 1239 [big]#the phrase # because of trailing space in phrase. 1240 1241 Before[foo]#the phrase# because of missing non-word character before clause. 1242 1243 Before [foo]#the phrase#after because of missing non-word character after clause. 1244 1245 1246 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Escaped 1247 1248 This is not \[underline]#underlined text#. 1249 1250 1251 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Emphasized 1252 1253 <beginfold id='1'>===</beginfold id='1'> Rendered formatted 1254 1255 This line contains a _sequence_ of _multiple emphasized_ words. 1256 1257 This line contains a single _emphasized_ word. 1258 1259 This line contains a single __emphasized_ word. 1260 1261 This line contains a single _emphasized__ word. 1262 1263 The text within the brackets should be (_emphasized_), but the brackets themselves not. 1264 1265 (_emphasized_ [_emphasized_ {_emphasized_ |_emphasized_ ._emphasized_ ,_emphasized_ !_emphasized_ ?_emphasized_ _emphasized_? 1266 1267 _emphasized_) _emphasized_] _emphasized_} _emphasized_| _emphasized_. _emphasized_; _emphasized_, 1268 1269 _emphasized_( _emphasized_( _emphasized_[ _emphasized_{ 1270 1271 _emphasized_) 1272 1273 _emphasized_ 1274 1275 __aa__bb 1276 1277 aa__bb__ 1278 1279 aa__bb _cc__dd 1280 1281 aa__bb cc___dd 1282 1283 aa__ bb __cc 1284 1285 1286 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Rendered as-is 1287 1288 This line does not contain _some emphasized _ text as there is a surplus space. 1289 1290 This line does not contain_some emphasized_ text as there is a space missing. 1291 1292 This line does not contain _some emphasized_text as there is a space missing. 1293 1294 foo ;_emphasized_ :_emphasized_ }_emphasized_ 1295 1296 ;_emphasized_ 1297 :_emphasized_ 1298 }_emphasized_ 1299 1300 // FIXME Highlighting differs. 1301 In this line, there is some ___very emphasized___ text. 1302 Asciidoctor renders it as normal text, just ignoring all the underscores. 1303 That is a bit strange. 1304 1305 1306 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Escaped 1307 1308 Not \_emphasized_ as it is escaped. 1309 1310 Still \__emphasized__ as only the outermost level is escaped. 1311 1312 1313 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Marked 1314 1315 <beginfold id='1'>===</beginfold id='1'> Rendered formatted 1316 1317 Some # marked # text. 1318 1319 Works #also for multiple words#. 1320 1321 Some ##marked# text. 1322 1323 Some #marked## text. 1324 1325 Some ##marked## text. 1326 1327 Some[big]#marked# text. 1328 Not rendered big but marked, because of missing space before `[big]`. 1329 1330 Works also for p##art##s of a word. 1331 1332 p##art#!s 1333 1334 !#marked#! 1335 1336 #marked# 1337 1338 ##marked## 1339 1340 1341 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Rendered as-is 1342 1343 Not rendered # marked# because of space after the leading hash. 1344 1345 Not rendered #marked # because of space before the trailing hash. 1346 1347 Not rendered#marked# as there is a space missing. 1348 1349 Not rendered #marked#as there is a space missing. 1350 1351 This is #rendered# as a verbatim block as it is indented. 1352 1353 Some [big]#big marked# text. 1354 1355 Some [big]##big marked## text. 1356 1357 1358 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Escaped 1359 1360 Not \#marked# as it is escaped. 1361 1362 Still \##marked## as only the outermost level is escaped. 1363 1364 1365 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Monospaced 1366 1367 <beginfold id='1'>===</beginfold id='1'> Rendered formatted 1368 1369 This line contains a `sequence of ` multiple monospaced` words. 1370 1371 This line contains a single `monospaced` word. 1372 1373 This line contains a single ``monospaced` word. 1374 1375 This line contains a single `monospaced`` word. 1376 1377 The text within the brackets should be (`monospaced`), but the brackets themselves not. 1378 1379 before``monospaced``after. 1380 1381 `monospaced` 1382 1383 (`mono` [`mono` {`mono` |`mono` .`mono` ,`mono` !`mono` ?`mono` 1384 1385 `mono`) `mono`) `mono`] `mono`} `mono`| `mono`. `mono`; `mono`, `mono`? 1386 1387 `mono`( `mono`( `mono`[ `mono`{ 1388 1389 ``aa``bb 1390 1391 aa``bb`` 1392 1393 aa``bb `cc``dd 1394 1395 aa``bb cc```dd 1396 1397 aa`` bb ``cc 1398 1399 1400 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Rendered as-is 1401 1402 Not rendered ` monospaced` because of leading space. 1403 1404 Not rendered `monospaced ` because of trailing space. 1405 1406 Not rendered`monospaced` as there is a space missing. 1407 1408 Not rendered `monospaced`as there is a space missing. 1409 1410 1411 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Escaped 1412 1413 Not \`monospaced` as it is escaped. 1414 1415 Still \``monospaced`` as only the outermost level is escaped. 1416 1417 1418 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Passthrough 1419 1420 <beginfold id='1'>===</beginfold id='1'> Rendered passed through 1421 1422 This text is +passed _as_ is+ with no further formatting. 1423 1424 Matching +is _lazy_+, so this + is rendered. 1425 1426 This +_is_ passthrough`+` as passthrough has higher priority as monospaced. 1427 1428 +passthrough+ at line start. 1429 1430 Passthrough at +line end.+ 1431 1432 Minimal passthrough +a+. 1433 1434 1435 This text is ++passed _as_ is++ with no further formatting. 1436 1437 This text is +++passed _as_ is+++ with no further formatting. 1438 1439 1440 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Rendered as-is 1441 1442 No+passthrough+ as there is no space before the leading `+`. 1443 1444 No +passthrough+as there is no space after the trailing plus. 1445 1446 No + passthrough+ as there is a space after the leading `+`. 1447 1448 No +passthrough + as there is a space after the trailing plus. 1449 1450 1451 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Escaped 1452 1453 This text \+is _not_ passed through+ because of escaping. 1454 1455 This text \++is _still_ passed through++ as only the outermost level is escaped. 1456 1457 This text \+++is _still_ passed through+++ as only the outermost level is escaped. 1458 1459 1460 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Strong 1461 1462 <beginfold id='1'>===</beginfold id='1'> Rendered formatted 1463 1464 This line contains a *sequence of * multiple strong* words. 1465 1466 This line contains a single **strong* word. 1467 1468 This line contains a single**strong* word. 1469 1470 This line contains a single *strong** word. 1471 1472 The text within the brackets should be (*strong*), but the brackets themselves not. 1473 1474 (*strong* [*strong* {*strong* |*strong* .*strong* ,*strong* !*strong* ?*strong* 1475 1476 *strong*) *strong*] *strong*} *strong*| *strong*. *strong*; *strong*, *strong*? 1477 1478 *strong*( *strong*( *strong*[ *strong*{ 1479 1480 *strong*) 1481 1482 *strong* 1483 1484 aa**bb** 1485 1486 **aa**bb 1487 1488 aa**bb**cc 1489 1490 aa**bb *cc**dd 1491 1492 aa**bb cc***dd 1493 1494 aa** bb **cc 1495 1496 1497 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Rendered as-is 1498 1499 This line does _not_ contain *some strong * text as there is a space before the trailing asterisk. 1500 1501 This line does _not_ contain*some strong* text as there is a space missing before the leading asterisk. 1502 1503 This line does _not_ contain *some strong*text as there is a space missing after the trailing asterisk. 1504 1505 some text ;*strong* :*strong* _*strong* }*strong* 1506 1507 some text _*strong*_ 1508 1509 ;*strong* 1510 :*strong* 1511 }*strong* 1512 1513 Not *strong* as there is a leading space in the line, making it verbatim. 1514 1515 // FIXME Highlighting differs. 1516 In this line, there is some ***very strong*** text. 1517 It is rendered just ignoring the asterisks. 1518 That is a bit strange. 1519 1520 1521 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Escaped 1522 1523 Not \*strong* as it is escaped. 1524 1525 Still \**strong** as only the outermost level is escaped. 1526 1527 1528 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Subscript 1529 1530 <beginfold id='1'>===</beginfold id='1'> Rendered formatted 1531 1532 H~2~O 1533 1534 1535 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Rendered as-is 1536 1537 Not rendered sub~sc ript~ as there is a space within. 1538 1539 1540 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Escaped 1541 1542 Not \~subscript~ as it is escaped. 1543 1544 1545 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Superscript 1546 1547 <beginfold id='1'>===</beginfold id='1'> Rendered formatted 1548 1549 E = m c^2^ 1550 1551 1552 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Rendered as-is 1553 1554 Not rendered super^sc ript^ as there is a space within. 1555 1556 1557 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Escaped 1558 1559 Not \^superscript^ as it is escaped. 1560 1561 1562 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Combinations 1563 1564 IMPORTANT: Combinations are supported by Asciidoctor, as long as the markup sets are entered in the right order. 1565 The monospace markup must be the outermost set, then the strong set, and the emphasized markup must always be the innermost set. 1566 1567 1568 <beginfold id='1'>===</beginfold id='1'> Rendered formatted 1569 1570 This is *_strong emphasized_* text. 1571 1572 This is *__strong _ * emphasized_* text. 1573 1574 This is**_strong emphasized_**text. 1575 1576 This is**__ strong emphasized_**text. 1577 1578 *_strong emphasized_* 1579 1580 1581 This is `*strong monospaced*` text. 1582 1583 This is `**strong ` * monospaced*` text. 1584 1585 This is``*strong monospaced*``text. 1586 1587 This is``** strong monospaced*``text. 1588 1589 `*strong monospaced*` 1590 1591 1592 This is `_emphasized monospaced_` text. 1593 1594 This is `__emphasized ` _ monospaced_` text. 1595 1596 This is``_emphasized monospaced_``text. 1597 1598 This is``__ emphasized monospaced_``text. 1599 1600 `_emphasized monospaced_` 1601 1602 1603 This is `*_strong emphasized monospaced_*` text. 1604 1605 This is `*__strong emphasized * ` _ monospaced_*` text. 1606 1607 This is``*_strong emphasized monospaced_*``text. 1608 1609 This is``*__ strong emphasized monospaced_*``text. 1610 1611 `*_strong emphasized monospaced_*` 1612 1613 1614 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Unsupported 1615 1616 Highlighting for other combinations is currently not supported, as there would be a large number of rules and styles necessary. 1617 1618 * _emphasized #marked#_ 1619 * #marked *strong*# 1620 * *strong #marked#* 1621 * *strong _emphasized #marked#_* 1622 1623 * subscript _with~in~ emphasized_ 1624 * subscript within marked: #H~2~O# 1625 * subscript `with~in~ monospaced` 1626 * subscript *with~in~ strong* 1627 1628 * superscript _with^in^ emphasized_ 1629 * superscript within marked: #E = m c^2^# 1630 * superscript `with^in^ monospaced` 1631 * superscript *with^in^ strong* 1632 1633 And even more complex ones. 1634 1635 1636 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Rendered as-is 1637 1638 This is no *_ strong emphasized_* text, it's *strong* only. 1639 1640 This is no *_strong emphasized _* text, it's *strong* only. 1641 1642 This is no _*strong emphasized*_ text, it's _emphasized_ only. 1643 1644 This is no _`emphasized monospaced`_ text, it's _emphasized_ only. 1645 1646 1647 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Escaped 1648 1649 This is not rendered \`_emphasized monospaced_`. + 1650 But it is rendered emphasized. 1651 1652 This is not rendered \*_emphasized strong_*. + 1653 But it is rendered emphasized. 1654 1655 This is not rendered \`*monospaced strong*`. + 1656 But it is rendered strong. 1657 1658 This is not rendered \`*_emphasized monospaced strong_*`. + 1659 But it is rendered emphasized strong. 1660 1661 1662 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Horizontal Rules 1663 1664 <beginfold id='1'>==</beginfold id='1'> Simple patterns 1665 1666 ''' 1667 --- 1668 *** 1669 1670 1671 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Patterns with spaces 1672 1673 - - - 1674 * * * 1675 1676 .Not a horizontal rule 1677 ' ' ' 1678 1679 1680 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Arbitrary length 1681 1682 NOTE: Although the https://asciidoctor.org/docs/user-manual/#markdown-style-horizontal-rules[Asciidoctor Manual] states that horizontal rule patterns are only supporting up to three characters (ignoring the optional spaces), some longer patterns work too. 1683 1684 ''''''' 1685 1686 <beginfold id='3'>////</beginfold id='3'> 1687 These patterns don't work, as they start delimited blocks, item lists etc.. 1688 -------- 1689 ****** 1690 - - - - - - 1691 * * * * * * * * * 1692 <endfold id='3'>////</endfold id='3'> 1693 1694 1695 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Inside blocks 1696 1697 <beginfold id='2'>****</beginfold id='2'> 1698 Horizontal rules work also inside blocks. 1699 They eventually need an empty line before them, though. 1700 1701 ''' 1702 After the horizontal rule. 1703 <endfold id='2'>****</endfold id='2'> 1704 1705 1706 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Include 1707 :includedir: include 1708 1709 <beginfold id='1'>==</beginfold id='1'> Included Contents Rendered 1710 1711 IMPORTANT: The include directive is _always_ processed, even within passthrough blocks. 1712 1713 NOTE: Using file names with spaces works. 1714 1715 include::{includedir}/demo.adoc[] 1716 1717 .Partial include 1718 include::{includedir}/demo.adoc[lines=2..3] 1719 1720 .Inside contiguous block 1721 [literal] 1722 This line shall be highlighted as verbatim. 1723 include::{includedir}/demo.adoc[lines=2..3] 1724 This line shall be highlighted as verbatim. 1725 1726 .Inside delimited block with name 1727 [literal] 1728 <beginfold id='2'>----</beginfold id='2'> 1729 This line shall be highlighted as verbatim. 1730 include::{includedir}/demo.adoc[lines=2..3] 1731 This line shall be highlighted as verbatim. 1732 <endfold id='2'>----</endfold id='2'> 1733 1734 .Inside delimited block without name 1735 <beginfold id='2'>....</beginfold id='2'> 1736 This line shall be highlighted as verbatim. 1737 include::{includedir}/demo.adoc[lines=2..3] 1738 This line shall be highlighted as verbatim. 1739 <endfold id='2'>....</endfold id='2'> 1740 1741 .It is also processed within passthrough blocks 1742 [pass] 1743 This line shall be highlighted as passthrough. 1744 include::{includedir}/demo.adoc[lines=2..3] 1745 This line shall be highlighted as passthrough. 1746 1747 [pass] 1748 -- 1749 This line shall be highlighted as passthrough. 1750 include::{includedir}/demo.adoc[lines=2..3] 1751 This line shall be highlighted as passthrough. 1752 -- 1753 1754 .Inside table 1755 <beginfold id='2'>|===</beginfold id='2'> 1756 |row 1 col 1|row 2 col 2 1757 | 1758 // the include directive must have its own line with nothing else 1759 include::{includedir}/demo.adoc[lines=1..1] 1760 |row 2 col2 1761 1762 |row 3 col 1 1763 |row 3 col 2 1764 <endfold id='2'>|===</endfold id='2'> 1765 1766 1767 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Index 1768 1769 <beginfold id='1'>==</beginfold id='1'> Rendered as Index Term 1770 1771 This is a ((flow)) index term. 1772 1773 This is a indexterm2:[flow] index term. 1774 1775 This is a (((concealed, index, term))) concealed index term. 1776 1777 This is a indexterm:[concealed, index, term] concealed index term. 1778 1779 This is rendered as a ((flow index term))). 1780 1781 This is rendered as a (((flow index term)). 1782 1783 This is ((())) empty but rendered as index term nevertheless. 1784 1785 Some (((index term))). 1786 1787 Some ((((index term)))). 1788 1789 1790 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Rendered as-is 1791 1792 This is (()) not an index term as it is empty. 1793 1794 This is (not an index term)) as there is a `(` missing. 1795 1796 This is ((not an index term) as there is a `)` missing. 1797 1798 1799 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Escaped 1800 1801 This is \((not an indexterm)) as it is escaped. 1802 1803 This is \(((not a concealed index term))), but still a flow index term as only the outer brackets are escaped. 1804 1805 This is \(\((not an indexterm))) as it is fully escaped. 1806 1807 This is not a \indexterm2:[flow] index term. 1808 1809 This is not a \indexterm:[concealed, index, term] concealed index term. 1810 1811 1812 [index] 1813 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Index Catalog 1814 1815 WARNING: HTML output currently does not support the creation of the index catalog. 1816 1817 1818 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Link 1819 1820 <beginfold id='1'>==</beginfold id='1'> ftp, irc 1821 1822 * ftp://some.org/some/where/file.extension 1823 * irc://some.org/some/where/file.extension 1824 1825 1826 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> http(s) 1827 1828 * http://some.org/some/where/file.extension 1829 * https://some.org/some/where/file.extension 1830 1831 // . , ; : followed by a space terminate the link 1832 * https://some.org/some/where/file.extension. some text 1833 * https://some.org/some/where/file.extension.some text 1834 * https://some.org/some/where/file.extension, some text 1835 * https://some.org/some/where/file.extension,some text 1836 * https://some.org/some/where/file.extension; some text 1837 * https://some.org/some/where/file.extension;some text 1838 * https://some.org/some/where/file.extension: some text 1839 * https://some.org/some/where/file.extension some text 1840 * https://some.org/some/where/file.extension:some text 1841 1842 // unbalanced square brackets always terminate the link 1843 * https://some.org/some/where/file.extension[some text 1844 * https://some.org/some/where/file.extension[ some text 1845 * https://some.org/some/where/file.extension]some text 1846 * https://some.org/some/where/file.extension] some text 1847 1848 * https://some.org/some/where/file.extension[] 1849 * https://some.org/some/where/file.extension[some text]trailing text 1850 * https://some.org/some/where/file.extension[some text]. trailing text 1851 * https://some.org/some/where/file.extension[some text], trailing text 1852 * https://some.org/some/where/file.extension[some text]; trailing text 1853 * https://some.org/some/where/file.extension[some text]: trailing text 1854 * https://some.org/some/where/file.extension[some]text] trailing text 1855 * https://some.org/some/where/file.extension[some ]text] trailing text 1856 * https://some.org/some/where/file.extension[some \]text] - with escaped `]` 1857 1858 // TODO: highlighting of text within [] ? 1859 * some text https://some.org/some/where/file.extension[*some text*] trailing text. 1860 1861 // some characters may be placed before the `http` 1862 * (https://some.org 1863 * )https://some.org 1864 * [https://some.org 1865 * ]https://some.org 1866 * ;https://some.org 1867 * <https://some.org 1868 * >https://some.org 1869 1870 1871 <beginfold id='1'>===</beginfold id='1'> Not rendered as Link 1872 1873 * {https://some.org 1874 * }https://some.org 1875 * ,https://some.org 1876 * .https://some.org 1877 * :https://some.org 1878 1879 1880 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> link 1881 1882 * link:relative/path - not rendered as link as `[]` are misssing 1883 * link:relative/path[] 1884 * ##before##link:relative/path[]##after## - no spaces needed 1885 * link:relative/path/file.extension[local file] 1886 * link:relative/path/file.extension[local ]file] 1887 * link:relative/path/file.extension[local \]file] - with escaped `]` 1888 * link:relative/path with spaces/[] - not rendered as link because of spaces 1889 * link:++relative/path with spaces/++[] - but this is rendered as link with spaces 1890 * link:external.html#anchor[to anchor of local HTML file] 1891 * link:url[optional link text, optional target attribute, optional role attribute] 1892 1893 1894 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> E-Mail 1895 1896 * some.person@org.com 1897 * some.person@org.com[some one] - brackets supported only with leading `mailto:` 1898 * :some.person@org.com - not rendered as link because of leading `:` 1899 * /some.person@org.com - not rendered as link because of leading `/` 1900 1901 * mailto:some.person@org.com - not rendered as link as `[]` are misssing 1902 * mailto:some.person@org.com[] 1903 * ##before##mailto:some.person@org.com[]##after## - no spaces needed 1904 * mailto:some.person@org.com[some one] 1905 * mailto::some.person@org.com[] - not rendered as link because of double `:` 1906 * mailto: some.person@org.com[] - not rendered as mailto because of space after `:`, but still as inline email 1907 * mailto:[some one] - not rendered as link because of missing address 1908 1909 1910 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Escaped 1911 1912 * \ftp://some.org/some/where/file.extension 1913 * \irc://some.org/some/where/file.extension 1914 * \https://some.org/some/where/file.extension 1915 * \link:relative/path[] 1916 * \link:relative/path[] 1917 * \some.person@org.com 1918 * \:some.person@org.com 1919 * \/some.person@org.com 1920 * \mailto:some.person@org.com[] 1921 1922 1923 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> List 1924 1925 <beginfold id='1'>==</beginfold id='1'> Bulleted List 1926 1927 <beginfold id='3'>////</beginfold id='3'> 1928 FIXME The *** without text in the list below should not be highlighted as a horizontal line. 1929 This is going to be problematic, as we would need to know that we are currently inside a list. 1930 <endfold id='3'>////</endfold id='3'> 1931 .using asterisks 1932 * item 1 1933 * * item 2 1934 Has some text. 1935 ** item 2.1 1936 Also has some text. 1937 + 1938 And an additional paragraph. 1939 ** item 2.2 1940 *** item 2.2.1 1941 + 1942 Markers without a text are _no_ item. 1943 *** 1944 ** item 2.3 1945 *** item 2.3.1 1946 **** item 2.3.1.1 1947 * item 3 1948 1949 * item 4 1950 ** item 4.1 1951 **not an item as there is no space 1952 ** item 4.2 1953 1954 .using hyphens 1955 - item 1 1956 - item 2 1957 -- item 2.1 is not an item as using hyphens is only supported for flat lists 1958 1959 .inside a block 1960 <beginfold id='2'>****</beginfold id='2'> 1961 * item 1 1962 ** item 1.1 1963 <endfold id='2'>****</endfold id='2'> 1964 1965 1966 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Checklist 1967 1968 .using asterisks 1969 * [*] checked 1970 ** [x] also checked 1971 *** [x] also checked 1972 * [X] _invalid_ check (capital X), normal list item 1973 * [o] _invalid_ check (invalid character), normal list item 1974 * [] _invalid_ check (no space), normal list item 1975 * [ ] not checked 1976 * normal list item 1977 1978 .using hyphens 1979 - [*] checked 1980 - [*] also checked 1981 -- [*] _not a list item_ as hyphens are only supported for flat lists 1982 -- [*] _not a list item_ as hyphens are only supported for flat lists 1983 1984 1985 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Description List 1986 1987 .Normal format 1988 Term normal:: This is a description. 1989 Term indented:: This works too. 1990 1991 Term multi line:: 1992 This one has multiple lines. 1993 Two lines to be exact. 1994 Term L2::: This term is on level 2. 1995 Term L3:::: This term is on level 3. 1996 Term L4::::: This term is on level 4. 1997 Term L5:::::: This term is on level 5. 1998 Term with empty definition:: 1999 Term with separated colons :: This one has spaces before the `::`. 2000 Term no space::This is _not a description item_ as there is no space after the `::`. 2001 Term with unnumbered list:: 2002 * list item 1 2003 * list item 2 2004 Term with multiple colons:: in the term:: 2005 Having multiple `::` in one line is OK too. 2006 .;Strange Term = !?*:: This one has a strange term. 2007 Term 9 : : A space between the double `:` does _not_ work. 2008 2009 .Term and description on the same line 2010 [horizontal] 2011 Term 1:: first level. 2012 Term 2::: second level. 2013 Term 3:: first level again. 2014 2015 2016 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Numbered List 2017 2018 .using numbers 2019 1. item 1 2020 2. item 2 2021 3. item 3 2022 4 Is not an item. 2023 Numbers without a trailing dot do _not_ result in an item. 2024 123. This is an item with an out-of-sequence number. 2025 It will be fixed in the rendered output. 2026 2027 .using dots 2028 . item 1 2029 . item 2 2030 ..not an item as there is no space 2031 .. item 2.1 2032 .. item 2.2 2033 ... item 2.2.1 2034 .... item 2.2.1.1 2035 . item 3 2036 2037 2038 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Question and Answer List 2039 2040 [qanda] 2041 What is Asciidoctor?:: 2042 An implementation of the AsciiDoc processor in Ruby. 2043 Must the answer be indented?:: 2044 It's not necessary, but possibly. 2045 What is the answer to the Ultimate Question?:: 42 2046 2047 2048 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Macro 2049 // for `btn:`, `kbd:`, `menu:` 2050 :experimental: 2051 // for icon:tags[] etc. 2052 :imagesdir: media 2053 // needed to use macro `toc::[]` 2054 :toc: macro 2055 2056 <beginfold id='1'>==</beginfold id='1'> General Information 2057 2058 NOTE: There is no space needed before the macro name or after the closing `]`. 2059 2060 2061 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Anchor 2062 2063 There is a macro form anchor:anchor-id[Macro Anchor] for anchor definition. 2064 2065 See `anchor.adoc` for other forms. 2066 2067 2068 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Cross Reference 2069 2070 xref:anchor-id[macro xref] 2071 2072 WARNING: Highlighting for cross references with text spanning multiple lines is not supported. 2073 2074 xref:id[ 2075 Line 1 in cross reference text. 2076 Line 2 in cross reference text. 2077 ] 2078 2079 \xref:anchor-id[macro xref] escaped 2080 2081 2082 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Footnote 2083 2084 This text has a foonotefootnote:[A simple footnote.]. 2085 2086 This text has a foonote with idfootnoteref:[fn-1, A footnote reference.]. 2087 2088 2089 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Icon 2090 2091 This is a tag icon:tags[] icon with no color set. 2092 2093 This is a blue icon:tags[role="blue"] tag. 2094 2095 This is a big green icon:tags[role="green", size="2x"] tag. 2096 2097 2098 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Image 2099 2100 An imageimage:logo-outline-color.svg[Logo,25]within some text. 2101 2102 2103 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Keyboard Shortcut 2104 2105 kbd:[Ctrl+M] 2106 2107 2108 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Menu Selection 2109 2110 menu:File[Save] 2111 2112 menu:View[Zoom > 1:1] 2113 2114 2115 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Pass 2116 2117 // TODO Would be nice to highlight the text within the square brackets as passthrough. 2118 2119 Some pass:[<u>passthrough</u>] HTML. 2120 2121 Some pass:quotes[<u>passthrough with *quoted* text</u>] HTML. 2122 2123 Some pass:q[<u>passthrough with *quoted* text</u>] HTML. 2124 2125 2126 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Table of Contents 2127 2128 toc::[] 2129 2130 2131 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> UI Buttons 2132 2133 Press the btn:[OK] button when you are finished. 2134 2135 2136 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Escaped 2137 2138 This is no anchor \anchor:macro-anchor[Macro Anchor]. 2139 2140 This is no button \btn:[Cancel]. 2141 2142 This is no foonote\footnote:[A simple footnote.]. 2143 2144 This is no foonote with id\footnoteref:[fn-1, A footnote reference.]. 2145 2146 This is no image\image:logo-outline-color.svg[Tree, 25]. 2147 2148 This is no icon \icon:tags[]. 2149 2150 This is no keyboard shortcut \kbd:[Ctrl+M]. 2151 2152 This is no menu \menu:File[Save]. 2153 2154 This is no passthrough \pass:[<u>passthrough</u>]. 2155 2156 2157 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Media 2158 // The name `imagesdir` is a bit misleading as audio and video use also this prefix. 2159 :imagesdir: media 2160 2161 <beginfold id='1'>==</beginfold id='1'> Audio 2162 2163 audio::test.mp3[] 2164 2165 audio::test.mp3[options="loop"] 2166 2167 .Escaped 2168 \audio::test.mp3[] 2169 2170 2171 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Image 2172 2173 <beginfold id='1'>===</beginfold id='1'> Block Format 2174 2175 .Test SVG 2176 [#logo] 2177 [link=https://github.com/asciidoctor/brand] 2178 image::test.svg[Test, 100] 2179 2180 2181 <beginfold id='1'>====</beginfold id='1'> Not highlighted 2182 2183 .leading spaces, literal paragraph 2184 image::test.svg[Test, 100] 2185 2186 .trailing characters 2187 image::test.svg[Test, 100] trailing 2188 2189 2190 <endfold id='1'></endfold id='1'><beginfold id='1'>====</beginfold id='1'> Escaped 2191 2192 \image::test.svg[Asciidoctor Logo, 100] 2193 2194 2195 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Inline Format 2196 2197 Withinimage:logo-outline-color.svg[Tree, 25]some text. 2198 2199 NOTE: There is no space needed before `image` and none after the closing `]`. 2200 2201 image:logo-outline-color.svg[Tree, 25] at line start. 2202 2203 At line end image:logo-outline-color.svg[Tree, 25] 2204 2205 (image:logo-outline-color.svg[Tree, 25]) wrapped in non-space characters. 2206 2207 2208 <beginfold id='1'>====</beginfold id='1'> Not highlighted 2209 2210 image 2211 2212 image: 2213 2214 someimage: 2215 2216 some:image 2217 2218 some image:[] 2219 2220 2221 <endfold id='1'></endfold id='1'><beginfold id='1'>====</beginfold id='1'> Escaped 2222 2223 Within\image:logo-outline-color.svg[Tree, 25]some text. 2224 2225 2226 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Video 2227 2228 video::test.mp4[width=300] 2229 2230 video::test.mp4[width=200, options=loop] 2231 2232 .Escaped 2233 \video::test.mp4[] 2234 2235 2236 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Page break 2237 2238 <beginfold id='1'>==</beginfold id='1'> Rendered as page break 2239 2240 <<< 2241 2242 2243 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Not rendered as page break 2244 2245 .Not a page break as it is indented 2246 <<< 2247 2248 .Not a page break as it has trailing non-space characters 2249 <<< extra characters 2250 2251 .Escaped 2252 \<<< 2253 2254 2255 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Preprocessor 2256 2257 <beginfold id='1'>==</beginfold id='1'> If Defined 2258 2259 :!attr-1: 2260 ifdef::attr-1[] 2261 This line is _not_ rendered as the attribute is not defined. 2262 endif::[] 2263 2264 :attr-1: 2265 ifdef::attr-1[] 2266 This line _is_ rendered as the attribute is now defined. 2267 endif::[] 2268 2269 .Short form avoiding `endif` 2270 ifdef::attr-1[The attribute `attr-1` is defined] 2271 2272 2273 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> If Not Defined 2274 2275 :!attr-1: 2276 ifndef::some-attribute[] 2277 This line _is_ rendered as it is inside a 'if-not-defined' statement and `some-attribute` is not defined. 2278 endif::some-attribute[] 2279 2280 .Short form avoiding `endif` 2281 ifndef::some-attribute[The attribute `attr-1` is _not_ defined] 2282 2283 2284 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Any (or) 2285 2286 :!attr-1: 2287 :!attr-2: 2288 :attr-3: 2289 ifdef::attr-1,attr-2,attr-3[] 2290 This line is rendered as at least one of the attributes is defined. 2291 endif::[] 2292 2293 :!attr-1: 2294 :!attr-2: 2295 :!attr-3: 2296 ifdef::attr-1,attr-2,attr-3[] 2297 This line is not rendered as none of the attributes is defined. 2298 endif::[] 2299 2300 2301 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> None (nor) 2302 2303 :!attr-1: 2304 :!attr-2: 2305 :!attr-3: 2306 ifndef::attr-1,attr-2,attr-3[] 2307 This line is rendered as none of the attributes is defined. 2308 endif::[] 2309 2310 :!attr-1: 2311 :!attr-2: 2312 :attr-3: 2313 ifndef::attr-1,attr-2,attr-3[] 2314 This line is not rendered as at least one of the attributes is defined. 2315 endif::[] 2316 2317 2318 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> All (and) 2319 2320 :attr-1: 2321 :attr-2: 2322 :attr-3: 2323 ifdef::attr-1+attr-2+attr-3[] 2324 This line is rendered as all the attributes are defined. 2325 endif::[] 2326 2327 :attr-1: 2328 :attr-2: 2329 :!attr-3: 2330 ifndef::attr-1+attr-2+attr-3[] 2331 This line is not rendered as at least one of the attributes is not defined. 2332 endif::[] 2333 2334 2335 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Not All (nand) 2336 2337 :attr-1: 2338 :attr-2: 2339 :!attr-3: 2340 ifndef::attr-1+attr-2+attr-3[] 2341 This line is rendered as at least one of the attributes is defined. 2342 endif::[] 2343 2344 :attr-1: 2345 :attr-2: 2346 :attr-3: 2347 ifndef::attr-1+attr-2+attr-3[] 2348 This line is not rendered as all the attributes are not defined. 2349 endif::[] 2350 2351 2352 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> If Eval 2353 2354 :two: 2 2355 ifeval::[{two} > 1] 2356 This line is rendered as the expression evaluates to true. 2357 endif::[] 2358 2359 :not-true: false 2360 ifeval::[{not-true} == true] 2361 This line is not rendered as the expression evaluates to false. 2362 endif::[] 2363 2364 2365 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Escaped 2366 2367 :!attr-1: 2368 \ifdef::attr-1[] 2369 This line is rendered as the `ifdef`-statement is escaped. 2370 \endif::[] 2371 2372 :!attr-1: 2373 \ifndef::some-attribute[Only if the attribute is not defined] 2374 This line is rendered as the `ifndef`-statement is escaped. 2375 \endif::some-attribute[] 2376 2377 :not-true: false 2378 \ifeval::[{not-true} == true] 2379 This line is rendered as the `ifeval`-statement is escaped. 2380 \endif::[] 2381 2382 2383 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Quote and Verse 2384 2385 <beginfold id='1'>==</beginfold id='1'> Quote 2386 2387 .Contiguous block / paragraph 2388 [quote, attribution, citation title and information] 2389 [[quote-block-id]] 2390 Inside the *contiguous block quote*. 2391 Last line of the quote block. 2392 2393 This line is not part of the contiguous block quote anymore. 2394 2395 .Delimited with block name 2396 [quote, attribution, citation title and information] 2397 [[quote-block-id]] 2398 <beginfold id='2'>____</beginfold id='2'> 2399 Inside the *delimited block quote*. 2400 2401 May contain emtpy lines. 2402 <endfold id='2'>____</endfold id='2'> 2403 2404 .Delimited without block name 2405 [[quote-block-id]] 2406 <beginfold id='2'>____</beginfold id='2'> 2407 Inside the *delimited block quote*. 2408 2409 May contain emtpy lines. 2410 <endfold id='2'>____</endfold id='2'> 2411 2412 .Using an open block 2413 [quote] 2414 [[quote-block-id]] 2415 <beginfold id='2'>--</beginfold id='2'> 2416 Inside the *open block quote*. 2417 <endfold id='2'>--</endfold id='2'> 2418 2419 .Nested block quote 2420 [quote, outer attribution, outer citation title and information] 2421 [[quote-block-id]] 2422 <beginfold id='2'>____</beginfold id='2'> 2423 First line of outer quote. 2424 [quote, inner attribution, inner citation title and information] 2425 [[quote-block-id]] 2426 <beginfold id='2'>______</beginfold id='2'> 2427 Inside the inner quote. 2428 <endfold id='2'>______</endfold id='2'> 2429 Last line of outer quote. 2430 <endfold id='2'>____</endfold id='2'> 2431 2432 // Currently no specific highlighting supported. 2433 .Quoted paragraph 2434 "Inside the *quoted paragraph*. 2435 As being a paragraph, no empty lines are supported." 2436 -- attribution, citation title and information 2437 2438 2439 .Air quote 2440 [,attribution, citation title and information] 2441 <beginfold id='2'>"" </beginfold id='2'> 2442 Inside the *air quote*. 2443 2444 Supports empty lines. 2445 <endfold id='2'>""</endfold id='2'> 2446 2447 // Currently no specific highlighting supported. 2448 .Markdown style 2449 > Inside the *markdown quote*. 2450 > 2451 > May contain emtpy lines. 2452 > -- attribution, citation title and information 2453 2454 // Currently no specific highlighting supported. 2455 .Nested markdown style 2456 > Start of outer quote. 2457 > 2458 > > Some inner quote. 2459 > 2460 > * can use AsciiDoc ... 2461 > * inside markdown block 2462 > 2463 > > Another inner quote. 2464 > 2465 > End of outer quote. 2466 2467 2468 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Verse 2469 2470 .Contiguous block / paragraph 2471 [verse, attribution, citation title and information] 2472 [[verse-block-id]] 2473 Inside the *contiguous block verse*. 2474 Second line of the verse block. 2475 2476 This line is not part of the contiguous verse block anymore. 2477 2478 .Delimited block with name 2479 [verse, attribution, citation title and information] 2480 [[verse-block-id]] 2481 <beginfold id='2'>____</beginfold id='2'> 2482 Inside the *delimited block verse*. 2483 2484 Supports empty lines. 2485 <endfold id='2'>____</endfold id='2'> 2486 2487 .Delimited block without name 2488 This would be rendered as a quote block as the same delimiters are used. 2489 2490 .Using an open block 2491 [verse, attribution, citation title and information] 2492 [[verse-block-id]] 2493 <beginfold id='2'>--</beginfold id='2'> 2494 Inside the *open block verse*. 2495 <endfold id='2'>--</endfold id='2'> 2496 2497 2498 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Replacement 2499 2500 TIP: See also the https://asciidoctor.org/docs/user-manual/#replacements[corresponding section] in the Asciidoctor manual. 2501 2502 2503 <beginfold id='1'>==</beginfold id='1'> Textual symbol replacements 2504 2505 <beginfold id='2'>|===</beginfold id='2'> 2506 |Name |Syntax |Escaped 2507 2508 |copyright |(C) |\(C) 2509 |registered |(R) |\(R) 2510 |trademark |(TM) |\(TM) 2511 2512 |apostrophe |KDE's |KDE\'s 2513 |ellipses |... |\... footnote:[Escaping has no effect] 2514 |m dash |-- |\-- footnote:[Escaping yields another different dash] 2515 2516 |left single arrow |<- |\<- 2517 |right single arrow |-> |\-> 2518 |left double arrow |<= |\<= 2519 |right double arrow |=> |\=> 2520 <endfold id='2'>|===</endfold id='2'> 2521 2522 2523 <beginfold id='1'>===</beginfold id='1'> Not replaced 2524 2525 // Single apostrophe must be surrounded by alphabetic characters. 2526 * a' 2527 * 'a 2528 * .'. 2529 * a'. 2530 * .'a 2531 2532 2533 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Numerical Character Reference 2534 2535 <beginfold id='1'>===</beginfold id='1'> Decimal 2536 2537 § 2538 2539 ##before##§##after## 2540 2541 § 2542 2543 2544 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Hexadecimal 2545 2546 § 2547 2548 ##before##§##after## 2549 2550 § 2551 2552 2553 <endfold id='1'></endfold id='1'><beginfold id='1'>===</beginfold id='1'> Escaped 2554 2555 \§ 2556 \§ 2557 \§ 2558 \§ 2559 2560 2561 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> HTML/XML Character Entity References 2562 2563 See e.g. https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references[Wikipedia]. 2564 2565 IMPORTANT: Highlighting of HTML/XML character entity references is _not_ supported. 2566 There are just too many of them. 2567 2568 // some examples 2569 <beginfold id='2'>====</beginfold id='2'> 2570 ≠ 2571 ≡ 2572 <endfold id='2'>====</endfold id='2'> 2573 2574 2575 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Section L0 2576 2577 [abstract] 2578 <beginfold id='1'>==</beginfold id='1'> Abstract 2579 2580 This document is used for testing various aspects of syntax highlighting regarding sections. 2581 2582 :title-attribute: with attribute 2583 2584 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Section L1 2585 2586 <beginfold id='1'>===</beginfold id='1'> Section L2 2587 2588 <beginfold id='1'>====</beginfold id='1'> Section L3 2589 2590 <beginfold id='1'>=====</beginfold id='1'> Section L4 2591 2592 <beginfold id='1'>======</beginfold id='1'> Section L5 2593 2594 ======= This is not a new section 2595 2596 The level would be too deep. 2597 Only sections up to level 5 (having 6 leading `=`) are supported. 2598 2599 2600 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>####</beginfold id='1'> Section L3 2601 2602 Using Markdown section syntax works too. 2603 2604 =#=# This is not a section. 2605 Use either `=` or `#`, but not mixed. 2606 2607 2608 <beginfold id='1'>=====</beginfold id='1'> [[id-1]] [[id-2]] Section L4 2609 2610 This section has leading additional achors. 2611 2612 2613 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>====</beginfold id='1'> Section L3 [[id-1]][[id-2]] 2614 2615 This section has trailing additional anchors. 2616 2617 2618 <endfold id='1'></endfold id='1'><beginfold id='1'>====</beginfold id='1'> [[id-1]][[id-2]]Section L3[[id-3]][[id-4]] 2619 2620 This section has both leading and trailing additional anchors. 2621 2622 2623 <endfold id='1'></endfold id='1'><beginfold id='1'>====</beginfold id='1'> Section L3 {title-attribute} in Title 2624 2625 .Title {title-attribute} 2626 This section has an attribute in its title. 2627 2628 2629 [discrete] 2630 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Discrete Section 2631 2632 This section will not be shown in the table of contents. 2633 2634 <beginfold id='3'>////</beginfold id='3'> 2635 == Section with _emphasized_ text 2636 2637 === Section with escaped \_emphasized_ text 2638 <endfold id='3'>////</endfold id='3'> 2639 2640 2641 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Section with #marked# text 2642 2643 <beginfold id='1'>===</beginfold id='1'> Section with escaped \#marked# text 2644 2645 2646 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Section with `monospaced` text 2647 2648 <beginfold id='1'>===</beginfold id='1'> Section with escaped \`monospaced` text 2649 2650 <beginfold id='3'>////</beginfold id='3'> 2651 == Section with *strong* text 2652 2653 === Section with escaped \*strong* text 2654 <endfold id='3'>////</endfold id='3'> 2655 2656 2657 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Another Section at Level 0 2658 2659 Some text in the second level 0 section. 2660 2661 <beginfold id='1'>==</beginfold id='1'> Section 2.1 2662 2663 Some text. 2664 2665 2666 <endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=</beginfold id='1'> Table 2667 2668 <beginfold id='1'>==</beginfold id='1'> Default Separator 2669 2670 .PSV 2671 // some comment 2672 [[table-1]] 2673 [.some-role] 2674 [#table-shorthand] 2675 // some comment 2676 <beginfold id='2'>|===</beginfold id='2'> 2677 // some comment 2678 | header col 1 | header col 2 | header col 3 2679 // some comment 2680 2681 // with escaped cell separator 2682 | row 1 \| col 1 | row 1 col 2 | row 1 col 3 2683 // no spaces needed around `|` 2684 | *row* 2 col 1|row 2 col 2|row 2 col 3 2685 2686 |row 3 col 1 2687 // using attribute 2688 | row 3 col 2 {vbar} 2689 |ro3 3 col 3 2690 2691 | row 4 col 1 a|some AsciiDoc in col 2 row 4 2692 2693 * item 1 2694 * item 2 2695 |row 4 col 3 2696 2697 2*| row 5 has same contents in first 2 columns 2698 |row 5 col 3 2699 2700 |row 6 col 1 2+| span row 6 in col 2 and 3 2701 2702 .2+|span col 1 in row 6 and 7|row 6 col 2|row 6 col 3 2703 |row 7 col 2|row 7 col 3 2704 2705 2.2+^.^|span col 1 and 2 in row 8 and 9|row 8 col 3 2706 |row 9 col 3 2707 2708 e|row 10 col 1 is emphasized (italic) 2709 s|row 10 col 2 is strong (bold) 2710 m|row 10 col 3 is monospaced 2711 <endfold id='2'>|===</endfold id='2'> 2712 2713 2714 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Custom Separator 2715 2716 IMPORTANT: Highlighting of tables with custom separator is not supported. 2717 All `|` inside the table will be falsly highlighted. 2718 2719 [separator=!] 2720 <beginfold id='2'>|===</beginfold id='2'> 2721 // the `|` in the line below should not be highlighted. 2722 !row 1 | col 1 !row 1 col 2 2723 s!row 2 col 1 !row 2 col 2 2724 <endfold id='2'>|===</endfold id='2'> 2725 2726 [separator=a] 2727 <beginfold id='2'>|===</beginfold id='2'> 2728 arow 1 col 1 arow 1 col 2 2729 sarow 2 col 1 arow 2 col 2 2730 <endfold id='2'>|===</endfold id='2'> 2731 2732 2733 <endfold id='1'></endfold id='1'><beginfold id='1'>==</beginfold id='1'> Delimiter-Separated Values 2734 2735 IMPORTANT: Highlighting for tables with delimiter-separated values is not supported. 2736 All `|` inside the table will be falsly highlighted. 2737 2738 [format=csv] 2739 <beginfold id='2'>|===</beginfold id='2'> 2740 Col 1 ,Col 2 ,Col 3 2741 2742 // the `|` in the line below should not be highlighted. 2743 row 1 | col 1 ,row 1 col 2 ,row 1 col 3 2744 row 2 col 2,row 2 col 2,row 2 col 3 2745 2746 row 3 col 3 , "row ""3"", col 2" , row 3 col 3 2747 <endfold id='2'>|===</endfold id='2'> 2748 2749 2750 <beginfold id='1'>===</beginfold id='1'> Shorthand Notation for Data Tables 2751 2752 .CSV 2753 ,=== 2754 Col 1 ,Col 2 ,Col 3 2755 2756 row 1 col 1 ,row 1 col 2 ,row 1 col 3 2757 row 2 col 2,row 2 col 2,row 2 col 3 2758 2759 row 3 col 3 , "row ""3"", col 2" , row 3 col 3 2760 ,=== 2761 2762 .DSV 2763 :=== 2764 Col 1 :Col 2 :Col 3 2765 2766 row 1 col 1 :row 1 col 2 :row 1 col 3 2767 row 2 col 2:row 2 col 2:row 2 col 3 2768 row 3 col 3 : row 3 col 2 : row 3 col 3 2769 :=== 2770 2771