| 1 |
<!DOCTYPE html> |
| 2 |
<html><head> |
| 3 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 4 |
<title>asciidoc.adoc</title> |
| 5 |
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (AsciiDoc) - Theme (Breeze Light)"/> |
| 6 |
</head><body style="background-color:#ffffff;color:#1f1c1b"><pre> |
| 7 |
<span style="font-weight:bold">= AsciiDoc Syntax Highlighting</span> |
| 8 |
<span style="color:#898887">// There are multiple level 0 sections, so use book instead of article.</span> |
| 9 |
<span style="color:#0057ae">:doctype: </span><span style="color:#0057ae;font-style:italic">book</span> |
| 10 |
<span style="color:#898887">// For nice admonition and callout icons.</span> |
| 11 |
<span style="color:#0057ae">:icons: </span><span style="color:#0057ae;font-style:italic">font</span> |
| 12 |
<span style="color:#0057ae">:toc: </span><span style="color:#0057ae;font-style:italic">left</span> |
| 13 |
|
| 14 |
Testing the syntax highlighting support in KDE Frameworks. |
| 15 |
|
| 16 |
The first of the following sections lists the things that are known not to work. |
| 17 |
Further sections are intended for testing the supported features of AsciiDoc. |
| 18 |
|
| 19 |
|
| 20 |
<span style="color:#bf0303;font-weight:bold">= Known Not to Work</span> |
| 21 |
|
| 22 |
There are a couple of things that are known not to work. |
| 23 |
|
| 24 |
|
| 25 |
<span style="color:#bf0303;font-weight:bold">== Block</span> |
| 26 |
|
| 27 |
<span style="font-weight:bold">*</span> Highlighting of attributes inside a block title. |
| 28 |
|
| 29 |
<span style="font-weight:bold">*</span> Highlighting of formatted text inside a block title other than <span style="font-weight:bold;text-decoration:underline">...</span> |
| 30 |
<span style="font-weight:bold">**</span> <span style="color:#b08000">#marked#</span> |
| 31 |
<span style="font-weight:bold">**</span> <span style="color:#607880">`monospaced`</span> |
| 32 |
|
| 33 |
<span style="font-weight:bold">*</span> Code folding for contiguous blocks. |
| 34 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 35 |
This has an advantage too, though. |
| 36 |
It enables the user to decide on having code folding or not. |
| 37 |
For short blocks without empty lines where no code folding is desired, use contiguous blocks. |
| 38 |
For longer blocks which should support code folding, use delimited blocks. |
| 39 |
|
| 40 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://asciidoctor.org/docs/user-manual/#discrete-headings[Discrete headings]</span> inside block. |
| 41 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 42 |
<span style="color:#006e28;font-weight:bold">-----</span> |
| 43 |
<span style="color:#607880">****</span> |
| 44 |
<span style="color:#607880">Some text.</span> |
| 45 |
|
| 46 |
<span style="color:#607880">[discrete]</span> |
| 47 |
<span style="color:#607880">=== Discrete Heading</span> |
| 48 |
|
| 49 |
<span style="color:#607880">Some more text.</span> |
| 50 |
<span style="color:#607880">****</span> |
| 51 |
<span style="color:#006e28;font-weight:bold">-----</span> |
| 52 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 53 |
Syntax highlighting does not recognize discrete headings inside a block. |
| 54 |
If a normal section title is marked as being discrete, highlighting works. |
| 55 |
|
| 56 |
|
| 57 |
<span style="color:#bf0303;font-weight:bold">== Custom Styles</span> |
| 58 |
|
| 59 |
<span style="font-weight:bold">*</span> Highlighting of formatted text within the phrase to be styled. |
| 60 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 61 |
<span style="color:#607880"> Some [big]#big and *strong*# text.</span> |
| 62 |
|
| 63 |
<span style="font-weight:bold">*</span> Highlighting of styles with a phrase that spans multiple lines. |
| 64 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 65 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 66 |
<span style="color:#607880">[big]#this</span> |
| 67 |
<span style="color:#607880">is</span> |
| 68 |
<span style="color:#607880">not</span> |
| 69 |
<span style="color:#607880">highlighted#</span> |
| 70 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 71 |
|
| 72 |
|
| 73 |
<span style="color:#bf0303;font-weight:bold">== Formatted/Quoted Text</span> |
| 74 |
|
| 75 |
<span style="font-weight:bold">*</span> Highlighting of formatted/quoted text (e.g. monospaced) that spans multiple lines. |
| 76 |
|
| 77 |
<span style="font-weight:bold">*</span> Highlighting combinations besides those of emphasized, strong and monospaced. |
| 78 |
<span style="font-weight:bold">**</span> Attributes inside other formatting. |
| 79 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 80 |
<span style="color:#607880"> `{attribute-id} inside monospaced`</span> |
| 81 |
|
| 82 |
<span style="font-weight:bold">**</span> Passthrough inside other formatting. |
| 83 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 84 |
<span style="color:#607880"> `+passthrough+ inside monospaced`</span> |
| 85 |
|
| 86 |
<span style="font-weight:bold">**</span> Marked text inside other formatting. |
| 87 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 88 |
<span style="color:#607880"> `#marked# inside monospaced`</span> |
| 89 |
|
| 90 |
<span style="font-weight:bold">**</span> Subscript inside other formatting. |
| 91 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 92 |
<span style="color:#607880"> `~sub~script inside monospaced`</span> |
| 93 |
|
| 94 |
<span style="font-weight:bold">**</span> Superscript inside other formatting. |
| 95 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 96 |
<span style="color:#607880"> `^super^script inside monospaced`</span> |
| 97 |
|
| 98 |
And even more complex combinations. |
| 99 |
|
| 100 |
|
| 101 |
<span style="color:#bf0303;font-weight:bold">== List</span> |
| 102 |
|
| 103 |
<span style="font-weight:bold">*</span> Inside a list, indented lines without leading asterisks or hyphen start highlighting for a verbatim paragraph. |
| 104 |
Asciidoctor renders this as normal text. |
| 105 |
|
| 106 |
|
| 107 |
<span style="color:#bf0303;font-weight:bold">== Macro</span> |
| 108 |
|
| 109 |
<span style="font-weight:bold">*</span> Highlighting of macros with a text argument that spans multiple lines. |
| 110 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 111 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 112 |
<span style="color:#607880">xref:id[this works just fine]</span> |
| 113 |
|
| 114 |
<span style="color:#607880">xref:id[</span> |
| 115 |
<span style="color:#607880">highlighting a macro with</span> |
| 116 |
<span style="color:#607880">a text that spans multiples</span> |
| 117 |
<span style="color:#607880">does not work</span> |
| 118 |
<span style="color:#607880">]</span> |
| 119 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 120 |
|
| 121 |
|
| 122 |
<span style="color:#bf0303;font-weight:bold">== Quote, Verse</span> |
| 123 |
|
| 124 |
<span style="font-weight:bold">*</span> Highlighting for single quote symbol <span style="color:#607880">`"`</span>. |
| 125 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 126 |
Highlighting for air quotes <span style="color:#607880">`""`</span> is supported. |
| 127 |
|
| 128 |
<span style="font-weight:bold">*</span> Highlighting for Markdown style quotes. |
| 129 |
|
| 130 |
|
| 131 |
<span style="color:#bf0303;font-weight:bold">== Replacement</span> |
| 132 |
|
| 133 |
Highlighting for replacements is limited to those listed in the <span style="color:#0057ae;text-decoration:underline">https://asciidoctor.org/docs/user-manual/#replacements[Asciidoctor Manual]</span> and numerical character references. |
| 134 |
|
| 135 |
Highlighting for other <span style="color:#0057ae;text-decoration:underline">https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references[HTML/XML character references]</span> is not supported. |
| 136 |
|
| 137 |
<span style="color:#bf0303;font-style:italic">.Examples of supported references</span> |
| 138 |
<span style="font-weight:bold">*</span> <span style="color:#607880">`+(C)+`</span> resulting in <span style="font-weight:bold;text-decoration:underline">(C)</span> |
| 139 |
<span style="font-weight:bold">*</span> <span style="color:#607880">`+=>+`</span> resulting in <span style="font-weight:bold;text-decoration:underline">=></span> |
| 140 |
<span style="font-weight:bold">*</span> <span style="color:#607880">`+&#188;+`</span> resulting in <span style="font-weight:bold;text-decoration:underline">&#188;</span> |
| 141 |
|
| 142 |
<span style="color:#bf0303;font-style:italic">.Examples of references that are not supported</span> |
| 143 |
<span style="font-weight:bold">*</span> <span style="color:#607880">`+&frac14;+`</span> resulting in &frac14; |
| 144 |
<span style="font-weight:bold">*</span> <span style="color:#607880">`+&phi;+`</span> resulting in &phi; |
| 145 |
|
| 146 |
|
| 147 |
<span style="color:#bf0303;font-weight:bold">== Section</span> |
| 148 |
|
| 149 |
<span style="font-weight:bold">*</span> Setext style for section titles. |
| 150 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 151 |
Only Atx style is supported. |
| 152 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 153 |
<span style="color:#006e28">NOTE:</span> Asciidoctor<span style="font-weight:bold;text-decoration:underline">'</span>s <span style="color:#0057ae;text-decoration:underline">https://asciidoctor.org/docs/asciidoc-recommended-practices/[recommended practices]</span> states <span style="font-style:italic">_not_</span> to use Setext style for section titles. |
| 154 |
|
| 155 |
<span style="font-weight:bold">*</span> Highlighting of formatted/quoted text inside section title other than <span style="font-weight:bold;text-decoration:underline">...</span> |
| 156 |
<span style="font-weight:bold">**</span> <span style="color:#b08000">#marked#</span> |
| 157 |
<span style="font-weight:bold">**</span> <span style="color:#607880">`monospaced`</span> |
| 158 |
|
| 159 |
|
| 160 |
<span style="color:#bf0303;font-weight:bold">== Table</span> |
| 161 |
|
| 162 |
<span style="font-weight:bold">*</span> Highlighting of tables with custom separator. |
| 163 |
<span style="font-weight:bold">**</span> The custom separator will <span style="font-style:italic">_not_</span> be highlighted. |
| 164 |
<span style="font-weight:bold">**</span> All <span style="color:#607880">`|`</span> inside the table <span style="font-style:italic">_will be falsly_</span> highlighted. |
| 165 |
|
| 166 |
<span style="font-weight:bold">*</span> Highlighting of delimiter-separated tables. |
| 167 |
<span style="font-weight:bold">**</span> Table delimiters in shorthand notation and the value separator will <span style="font-style:italic">_not_</span> be highlighted. |
| 168 |
<span style="font-weight:bold">**</span> All <span style="color:#607880">`|`</span> inside the table <span style="font-style:italic">_will be falsly_</span> highlighted. |
| 169 |
|
| 170 |
<span style="font-weight:bold">*</span> Applying styles on table contents. |
| 171 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 172 |
When defining a table, individual columns or cells can be defined to be highlighted <span style="font-weight:bold">*strong*</span> etc.. |
| 173 |
Corresponding highlighting of these cells does not work. |
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
<span style="color:#bf0303;font-weight:bold">= Admonition</span> |
| 178 |
|
| 179 |
<span style="color:#bf0303;font-weight:bold">== Simple Format</span> |
| 180 |
|
| 181 |
<span style="color:#006e28">NOTE:</span> A simple note. |
| 182 |
|
| 183 |
Some text. |
| 184 |
NOTE: This is not a separate note as it is part of the paragraph started with the line above. |
| 185 |
|
| 186 |
NOTE:This is not a note as there is no space after the <span style="color:#607880">`:`</span>. |
| 187 |
|
| 188 |
<span style="color:#607880"> NOTE: This is not a note as it is indented.</span> |
| 189 |
|
| 190 |
NOTE : This is not a note as there are spaces between <span style="color:#607880">`NOTE`</span> and <span style="color:#607880">`:`</span>. |
| 191 |
|
| 192 |
NOTE: |
| 193 |
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. |
| 194 |
|
| 195 |
<span style="color:#006e28">NOTE:</span> This is a lengthy note in simple format. |
| 196 |
Second line. |
| 197 |
One more line. |
| 198 |
And another one. |
| 199 |
This is the last line. |
| 200 |
|
| 201 |
This line is not part of the simple note anymore. |
| 202 |
|
| 203 |
<span style="color:#006e28">CAUTION:</span> This is a CAUTION. |
| 204 |
|
| 205 |
<span style="color:#006e28">IMPORTANT:</span> This is IMPORTANT. |
| 206 |
|
| 207 |
<span style="color:#006e28">TIP:</span> This is a TIP. <span style="font-weight:bold;text-decoration:underline">+</span> |
| 208 |
This second line is rendered as a line on its own because of the trailing <span style="color:#607880">`+`</span> in the first line. |
| 209 |
|
| 210 |
<span style="color:#006e28">WARNING:</span> This is a WARNING. |
| 211 |
|
| 212 |
|
| 213 |
<span style="color:#bf0303;font-weight:bold">== Block Format</span> |
| 214 |
|
| 215 |
<span style="color:#bf0303;font-style:italic">.Contiguous</span> |
| 216 |
<span style="color:#006e28">[NOTE]</span> |
| 217 |
<span style="color:#644a9b">[[contiguous-note-id]]</span> |
| 218 |
This is a contiguous <span style="font-weight:bold">*note*</span> block. |
| 219 |
Second line. |
| 220 |
And one more line. |
| 221 |
<span style="color:#898887">// comment inside block</span> |
| 222 |
This is the final line. |
| 223 |
|
| 224 |
This line is not part of the contiguous note block anymore. |
| 225 |
|
| 226 |
<span style="color:#bf0303;font-style:italic">.Delimited</span> |
| 227 |
<span style="color:#006e28">[NOTE]</span> |
| 228 |
<span style="color:#644a9b">[[delimited-note-id]]</span> |
| 229 |
<span style="color:#006e28;font-weight:bold">====</span> |
| 230 |
This is a <span style="font-weight:bold">*note*</span> in block format. |
| 231 |
As a block, the note may have a title |
| 232 |
<span style="color:#898887">// comment inside block</span> |
| 233 |
|
| 234 |
In block format, multiple lines, paragraphs etc. are possible. |
| 235 |
<span style="color:#006e28;font-weight:bold">====</span> |
| 236 |
|
| 237 |
There is no delimited admonition block without block name. |
| 238 |
Using <span style="color:#607880">`====`</span> delimiter without a block name results in an example block. |
| 239 |
|
| 240 |
<span style="color:#bf0303;font-style:italic">.Using open block</span> |
| 241 |
<span style="color:#006e28">[NOTE]</span> |
| 242 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 243 |
Inside the open block note. |
| 244 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 245 |
|
| 246 |
|
| 247 |
<span style="color:#bf0303;font-weight:bold">= </span><span style="color:#644a9b">[[main-1]]</span><span style="color:#bf0303;font-weight:bold">An</span><span style="color:#644a9b">[[main-2]]</span><span style="color:#bf0303;font-weight:bold">chor</span><span style="color:#644a9b">[[main-3]]</span><span style="color:#bf0303;font-weight:bold"> and Cross Reference</span> |
| 248 |
|
| 249 |
<span style="color:#bf0303;font-weight:bold">== </span><span style="color:#644a9b">[[section-1]][[section-2]]</span><span style="color:#bf0303;font-weight:bold"> An</span><span style="color:#644a9b">[[section-3]][[section-4]]</span><span style="color:#bf0303;font-weight:bold">chor</span><span style="color:#644a9b">[[section-5]]</span> |
| 250 |
|
| 251 |
<span style="color:#644a9b">[[isolated-anchor]]</span> |
| 252 |
Isolated anchor. |
| 253 |
|
| 254 |
<span style="color:#644a9b">[[isolated-anchor-with-label,Isolated Anchor With Label]]</span> |
| 255 |
Isolated anchor with label. |
| 256 |
|
| 257 |
This line has an <span style="color:#644a9b">[[inline-anchor, Inline Anchor]]</span>anchor placed inside the text. |
| 258 |
|
| 259 |
<span style="color:#644a9b">[#isolated-shorthand]</span> |
| 260 |
Isolated anchor using shorthand definition. |
| 261 |
|
| 262 |
<span style="color:#644a9b">[#isolated-shorthand, Isolated Shorthand Anchor]</span> |
| 263 |
Isolated anchor with label using shorthand definition. |
| 264 |
|
| 265 |
This line has an <span style="color:#644a9b"> [ #inline-shorthand ]#anchor placed inside the text#</span> #. |
| 266 |
|
| 267 |
<span style="color:#bf0303;font-style:italic">.Inside </span><span style="color:#644a9b">[[block-anchor]]</span><span style="color:#bf0303;font-style:italic">block title</span> |
| 268 |
Works too. |
| 269 |
|
| 270 |
<span style="color:#bf0303;font-style:italic">.Macro form</span> |
| 271 |
There is also a ma<span style="color:#006e28">anchor:anchor-id[Macro Anchor]</span>cro form for anchor definition. |
| 272 |
|
| 273 |
<span style="color:#006e28">NOTE:</span> There is no space needed before the <span style="color:#607880">`anchor`</span> macro name. |
| 274 |
Also not after the closing <span style="color:#607880">`]`</span>. |
| 275 |
|
| 276 |
|
| 277 |
<span style="color:#bf0303;font-weight:bold">=== Not an anchor</span> |
| 278 |
|
| 279 |
[[ not-an-anchor]] |
| 280 |
because of the space after the opening brackets. |
| 281 |
|
| 282 |
[[not-an-anchor ]] |
| 283 |
because of the space before the closing brackets. |
| 284 |
|
| 285 |
<span style="color:#607880"> [[not-an-anchor]] because of line starting with spaces.</span> |
| 286 |
|
| 287 |
<span style="color:#607880"> [#not-an-anchor]#because# of line starting with spaces.</span> |
| 288 |
|
| 289 |
[#not-an-anchor] because of trailing text. |
| 290 |
|
| 291 |
Not an anchor because of leading text [#not-an-anchor] |
| 292 |
|
| 293 |
Also[<span style="color:#b08000">#not-an-anchor]#some text#</span> because of missing space before <span style="color:#607880">`[`</span>. |
| 294 |
|
| 295 |
Also [<span style="color:#b08000">#not-an-anchor] #some text#</span> because of space after <span style="color:#607880">`]`</span>. |
| 296 |
|
| 297 |
Also [<span style="color:#b08000">#not-an-anchor]#</span> some text# because of space after the leading <span style="color:#607880">`#`</span>. |
| 298 |
|
| 299 |
Also [<span style="color:#b08000">#not-an-anchor]because of missing referred text (e.g. `#some text#</span>`). |
| 300 |
|
| 301 |
|
| 302 |
<span style="color:#bf0303;font-weight:bold">=== Escaped</span> |
| 303 |
|
| 304 |
This is an escaped \[[anchor-id, some <span style="color:#b08000">#anchor#</span> label]] anchor. |
| 305 |
|
| 306 |
This is just some \normal text. |
| 307 |
|
| 308 |
Some\[[anchor-id]]anchor. |
| 309 |
|
| 310 |
\[[anchor-id]] |
| 311 |
|
| 312 |
<span style="color:#898887">////</span> |
| 313 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#898887">: highlighting differs</span> |
| 314 |
<span style="color:#898887">Asciidoctor seems to just pass through the anchor when escaping it.</span> |
| 315 |
<span style="color:#898887">This behaviour is rather unexpected, as in other cases the escaped contents is subject to further highlighting.</span> |
| 316 |
|
| 317 |
<span style="color:#898887">We currently only consume the opening bracket.</span> |
| 318 |
<span style="color:#898887">////</span> |
| 319 |
This is an escaped \[<span style="color:#b08000">#shorthand-id]#anchor in shorthand form#</span>. |
| 320 |
|
| 321 |
Some \[#shorthand-id]. |
| 322 |
|
| 323 |
\[#shorthand-id] |
| 324 |
|
| 325 |
\[<span style="color:#b08000">#shorthand-id]#</span> |
| 326 |
|
| 327 |
|
| 328 |
<span style="color:#bf0303;font-weight:bold">== Cross References</span> |
| 329 |
|
| 330 |
<span style="color:#0057ae;text-decoration:underline"><<main-1>></span> |
| 331 |
|
| 332 |
<span style="color:#0057ae;text-decoration:underline"><<main-2>></span> |
| 333 |
|
| 334 |
<span style="color:#0057ae;text-decoration:underline"><<main-3>></span> |
| 335 |
|
| 336 |
<span style="color:#0057ae;text-decoration:underline"><<section-1>></span> |
| 337 |
|
| 338 |
This is a reference to <span style="color:#0057ae;text-decoration:underline"><<section-2>></span>. |
| 339 |
|
| 340 |
<span style="color:#0057ae;text-decoration:underline"><<section-3>></span> some text >> some more text |
| 341 |
|
| 342 |
some << text <<span style="color:#0057ae;text-decoration:underline"><<section-4>></span>> |
| 343 |
|
| 344 |
<span style="color:#0057ae;text-decoration:underline"><<section-5>></span> |
| 345 |
|
| 346 |
<span style="color:#0057ae;text-decoration:underline"><<isolated-anchor>></span> |
| 347 |
|
| 348 |
<span style="color:#0057ae;text-decoration:underline"><<isolated-anchor-with-label>></span> |
| 349 |
|
| 350 |
<span style="color:#0057ae;text-decoration:underline"><<inline-anchor>></span> |
| 351 |
|
| 352 |
<span style="color:#0057ae;text-decoration:underline"><<isolated-shorthand>></span> |
| 353 |
|
| 354 |
<span style="color:#0057ae;text-decoration:underline"><<inline-shorthand>></span>. |
| 355 |
|
| 356 |
<span style="color:#0057ae;text-decoration:underline"><<block-anchor>></span> |
| 357 |
|
| 358 |
|
| 359 |
<span style="color:#bf0303;font-weight:bold">=== Escaped</span> |
| 360 |
|
| 361 |
This is not a reference \<<section-1>>. |
| 362 |
|
| 363 |
|
| 364 |
<span style="color:#bf0303;font-weight:bold">= Attribute</span> |
| 365 |
|
| 366 |
<span style="color:#bf0303;font-weight:bold">== No Value</span> |
| 367 |
|
| 368 |
<span style="color:#0057ae">:some-attribute:</span> |
| 369 |
This line should not be highlighted. |
| 370 |
|
| 371 |
<span style="color:#607880"> :not-an-attribute: as the line is indented.</span> |
| 372 |
|
| 373 |
|
| 374 |
<span style="color:#bf0303;font-weight:bold">== Single Line Value</span> |
| 375 |
|
| 376 |
Attributes with values that are rendered as a single line, even if their definition spans multiple lines. |
| 377 |
|
| 378 |
<span style="color:#bf0303;font-style:italic">.Single line definition</span> |
| 379 |
<span style="color:#0057ae">:single-line: </span><span style="color:#0057ae;font-style:italic">only one line</span> |
| 380 |
This line is not part of the attribute value anymore. |
| 381 |
|
| 382 |
<span style="color:#b08000">##before##</span><span style="color:#0057ae">{single-line}</span><span style="color:#b08000">##after##</span> |
| 383 |
|
| 384 |
<span style="color:#0057ae">:attr-in-attr-value: </span><span style="color:#0057ae;font-style:italic">in multi line definition</span> |
| 385 |
|
| 386 |
<span style="color:#bf0303;font-style:italic">.Multi line definition</span> |
| 387 |
<span style="color:#0057ae">:single-line-continued: </span><span style="color:#0057ae;font-style:italic">First line {attr-in-attr-value}.</span> <span style="font-weight:bold;text-decoration:underline">\</span> |
| 388 |
<span style="color:#0057ae;font-style:italic">Second line.</span> <span style="font-weight:bold;text-decoration:underline">\</span> |
| 389 |
<span style="color:#0057ae;font-style:italic">Another line.</span> |
| 390 |
This line is not part of the attribute value anymore. |
| 391 |
|
| 392 |
<span style="color:#b08000">##before##</span><span style="color:#0057ae">{single-line-continued}</span><span style="color:#b08000">##after##</span> |
| 393 |
|
| 394 |
<span style="color:#006e28">IMPORTANT:</span> At least one space is needed before the continuation <span style="color:#607880">`\`</span>. |
| 395 |
|
| 396 |
<span style="color:#bf0303;font-style:italic">.Line continuation is only highlighted when inside an attribute definition</span> |
| 397 |
some \ |
| 398 |
text |
| 399 |
|
| 400 |
|
| 401 |
<span style="color:#bf0303;font-weight:bold">== Multi Line Value</span> |
| 402 |
|
| 403 |
Attributes with values including hard line breaks. |
| 404 |
|
| 405 |
<span style="color:#006e28">IMPORTANT:</span> At least one space is needed before the continuation <span style="color:#607880">`+`</span> and between the <span style="color:#607880">`+`</span> and the <span style="color:#607880">`\`</span>. |
| 406 |
|
| 407 |
<span style="color:#0057ae">:multi-line: </span><span style="color:#0057ae;font-style:italic">First line.</span> <span style="font-weight:bold;text-decoration:underline">+</span> <span style="font-weight:bold;text-decoration:underline">\</span> |
| 408 |
<span style="color:#0057ae;font-style:italic">Second line.</span> <span style="font-weight:bold;text-decoration:underline">+</span> <span style="font-weight:bold;text-decoration:underline">\</span> |
| 409 |
<span style="color:#0057ae;font-style:italic">Third line.</span> |
| 410 |
This line is not part of the attribute value anymore. |
| 411 |
|
| 412 |
<span style="color:#b08000">##before##</span><span style="color:#0057ae">{multi-line}</span><span style="color:#b08000">##after##</span> |
| 413 |
|
| 414 |
|
| 415 |
<span style="color:#bf0303;font-weight:bold">== Inline Definition</span> |
| 416 |
|
| 417 |
Inline attribute definitions <span style="color:#0057ae">{set:inline-attribute:</span><span style="color:#0057ae;font-style:italic">just fine</span><span style="color:#0057ae">}</span> works <span style="color:#0057ae">{inline-attribute}</span>. |
| 418 |
|
| 419 |
<span style="color:#bf0303;font-style:italic">.Surplus </span><span style="color:#607880">`:`</span><span style="color:#bf0303;font-style:italic"> is part of the value</span> |
| 420 |
<span style="color:#0057ae">{set:attr:</span><span style="color:#0057ae;font-style:italic">:some value</span><span style="color:#0057ae">}</span> |
| 421 |
<span style="color:#0057ae">{attr}</span> |
| 422 |
|
| 423 |
<span style="color:#0057ae">{set:attr}</span> |
| 424 |
<span style="color:#0057ae">{attr}</span> |
| 425 |
|
| 426 |
<span style="color:#bf0303;font-style:italic">.Not an inline definition as leading </span><span style="color:#607880">`set:`</span><span style="color:#bf0303;font-style:italic"> is missing</span> |
| 427 |
{single-line:some value} |
| 428 |
|
| 429 |
|
| 430 |
<span style="color:#bf0303;font-weight:bold">== Unsetting</span> |
| 431 |
|
| 432 |
<span style="color:#0057ae">:!_custom_2-:</span> |
| 433 |
<span style="color:#0057ae">:_custom_2-!:</span> |
| 434 |
|
| 435 |
<span style="color:#bf0303;font-style:italic">.Adding a value when unsetting doesn't make sense, but doesn't hurt either</span> |
| 436 |
<span style="color:#0057ae">:some-attribute: </span><span style="color:#0057ae;font-style:italic">some value</span> |
| 437 |
Attribute is set to <span style="color:#607880">`{some-attribute}`</span>. |
| 438 |
|
| 439 |
<span style="color:#0057ae">:!some-attribute: </span><span style="color:#0057ae;font-style:italic">some value</span> |
| 440 |
<span style="color:#0057ae">{some-attribute}</span> is not set anymore. |
| 441 |
|
| 442 |
|
| 443 |
<span style="color:#bf0303;font-weight:bold">== Not an Attribute</span> |
| 444 |
|
| 445 |
:not-an-attribute:as there is no space after the terminating column of the identifier |
| 446 |
|
| 447 |
<span style="color:#607880"> :not-an-attribute: as it is indented</span> |
| 448 |
|
| 449 |
|
| 450 |
<span style="color:#bf0303;font-weight:bold">== Combination with Other Highlighting</span> |
| 451 |
|
| 452 |
<span style="color:#006e28;font-weight:bold">****</span> |
| 453 |
<span style="color:#0057ae">:inside-a-block: </span><span style="color:#0057ae;font-style:italic">inside a block</span> |
| 454 |
Using an attribute <span style="color:#0057ae">{inside-a-block}</span> works too. |
| 455 |
<span style="color:#006e28;font-weight:bold">****</span> |
| 456 |
|
| 457 |
<span style="color:#0057ae">:inside-formatting: </span><span style="color:#0057ae;font-style:italic">inside formatting</span> |
| 458 |
An attribute used <span style="color:#607880">`{inside-formatting}`</span> is not highlighting as attribute. |
| 459 |
|
| 460 |
|
| 461 |
<span style="color:#bf0303;font-weight:bold">== Escaped</span> |
| 462 |
|
| 463 |
\:attr-1: escaped attribute definition + \ |
| 464 |
second line of escaped attribute definition |
| 465 |
|
| 466 |
\:!attr-1: escaped unset attribute |
| 467 |
|
| 468 |
\:-attr-1: this is not highlighted as escaped attribute definition as it has an invalid attribute id. |
| 469 |
|
| 470 |
This \:attr-1: is not highlighted as escaped attribute definition as it is not used at line start. |
| 471 |
|
| 472 |
<span style="color:#0057ae">:attr-1: </span><span style="color:#0057ae;font-style:italic">some attribute</span> |
| 473 |
This is not rendered as \{attr-1}. |
| 474 |
|
| 475 |
This is not an inline attribute definition \{set:attr-2:some other attribute}. <span style="font-weight:bold;text-decoration:underline">+</span> |
| 476 |
<span style="color:#0057ae">{attr-2}</span> is not set. |
| 477 |
|
| 478 |
<span style="color:#006e28;font-weight:bold">****</span> |
| 479 |
<span style="color:#0057ae">:inside-a-block: </span><span style="color:#0057ae;font-style:italic">inside a block</span> |
| 480 |
Escaping an attribute \{inside-a-block} works too. |
| 481 |
<span style="color:#006e28;font-weight:bold">****</span> |
| 482 |
|
| 483 |
|
| 484 |
<span style="color:#bf0303;font-weight:bold">= Bibliography</span> |
| 485 |
|
| 486 |
<span style="color:#bf0303;font-weight:bold">== Using References</span> |
| 487 |
|
| 488 |
The first reference has no label, so its id <span style="color:#0057ae;text-decoration:underline"><<ref-1>></span> is rendered. |
| 489 |
|
| 490 |
The second reference has number <span style="color:#0057ae;text-decoration:underline"><<r2>></span> as label. |
| 491 |
|
| 492 |
The third reference has <span style="color:#0057ae;text-decoration:underline"><<r3>></span> as label. |
| 493 |
|
| 494 |
A reference definition inside the text instead of the bibliography section yields some strange result: <span style="color:#644a9b">[[[ref-o,outside bibliography]]]</span>]. |
| 495 |
Not sure what to do with this. |
| 496 |
|
| 497 |
This is trying to use the escaped reference <span style="color:#0057ae;text-decoration:underline"><<r4>></span>. |
| 498 |
|
| 499 |
This is trying to use reference <span style="color:#0057ae;text-decoration:underline"><<r6>></span>. |
| 500 |
|
| 501 |
|
| 502 |
<span style="color:#006e28">[bibliography]</span> |
| 503 |
<span style="color:#bf0303;font-weight:bold">== References</span> |
| 504 |
|
| 505 |
<span style="font-weight:bold">-</span> <span style="color:#644a9b">[[[ref-1]]]</span> This is reference 1. |
| 506 |
<span style="font-weight:bold">-</span> <span style="color:#644a9b">[[[r2,2]]]</span>This is reference 2. |
| 507 |
<span style="font-weight:bold">-</span> <span style="color:#644a9b">[[[r3,Some Text]]]</span> |
| 508 |
This is reference 3. |
| 509 |
<span style="font-weight:bold">-</span> [\[[r4, escaped]]] This is <span style="color:#b08000">#escaped#</span>. |
| 510 |
<span style="font-weight:bold">-</span> <span style="color:#644a9b">[[[r5,5]]]</span> This is reference 5. |
| 511 |
<span style="font-weight:bold">*</span> <span style="color:#644a9b">[[[r6,strange]]]</span> Using an asterisk yields a strange result. |
| 512 |
|
| 513 |
|
| 514 |
<span style="color:#bf0303;font-weight:bold">= Block</span> |
| 515 |
|
| 516 |
<span style="color:#006e28">[abstract]</span> |
| 517 |
<span style="color:#bf0303;font-style:italic">.Abstract - contiguous block</span> |
| 518 |
This document is used for testing syntax highlighting regarding various types of blocks. |
| 519 |
E.g. this contiguous abstract block. <span style="font-weight:bold;text-decoration:underline">+</span> |
| 520 |
Using block form for the abstract seems to be rendered differently than the section form (see <span style="color:#607880">`section.adoc`</span>). |
| 521 |
|
| 522 |
<span style="color:#006e28">[abstract]</span> |
| 523 |
<span style="color:#bf0303;font-style:italic">.Abstract - delimited open block</span> |
| 524 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 525 |
Using the delimited block form <span style="font-weight:bold;text-decoration:underline">...</span> |
| 526 |
|
| 527 |
enables having empty lines in the abstract. |
| 528 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 529 |
|
| 530 |
|
| 531 |
<span style="color:#bf0303;font-weight:bold">== General</span> |
| 532 |
|
| 533 |
<span style="color:#006e28">NOTE:</span> Starting and ending delimiter must be balanced, meaning they must have the same length. |
| 534 |
|
| 535 |
<span style="color:#bf0303;font-style:italic">.Block title </span><span style="color:#b08000">#before#</span><span style="color:#bf0303;font-style:italic"> block meta data</span> |
| 536 |
<span style="color:#006e28">[literal]</span> |
| 537 |
<span style="color:#006e28;font-weight:bold">....</span> |
| 538 |
<span style="color:#607880">Inside the block.</span> |
| 539 |
<span style="color:#006e28;font-weight:bold">....</span> |
| 540 |
|
| 541 |
<span style="color:#006e28">[literal]</span> |
| 542 |
<span style="color:#bf0303;font-style:italic">.Block title </span><span style="color:#607880">`after`</span><span style="color:#bf0303;font-style:italic"> block meta data</span> |
| 543 |
<span style="color:#006e28;font-weight:bold">....</span> |
| 544 |
<span style="color:#607880">Inside the block.</span> |
| 545 |
<span style="color:#006e28;font-weight:bold">....</span> |
| 546 |
|
| 547 |
<span style="color:#bf0303;font-style:italic">.Invalid block name</span> |
| 548 |
[ literal] |
| 549 |
<span style="color:#006e28;font-weight:bold">....</span> |
| 550 |
<span style="color:#607880">This block has invalid meta data as there is a space between the opening square bracket and the block name.</span> |
| 551 |
<span style="color:#006e28;font-weight:bold">....</span> |
| 552 |
|
| 553 |
<span style="color:#bf0303;font-style:italic">.Block with attributes</span> |
| 554 |
<span style="color:#006e28">[literal, some, attributes]</span> |
| 555 |
<span style="color:#006e28;font-weight:bold">....</span> |
| 556 |
<span style="color:#607880">Inside the block.</span> |
| 557 |
<span style="color:#006e28;font-weight:bold">....</span> |
| 558 |
|
| 559 |
<span style="color:#bf0303;font-style:italic">.Anchor before block name for contiguous block</span> |
| 560 |
<span style="color:#644a9b">[[contiguous_block_id_before_name]]</span> |
| 561 |
<span style="color:#006e28">[literal]</span> |
| 562 |
<span style="color:#607880">Inside the block.</span> |
| 563 |
|
| 564 |
<span style="color:#bf0303;font-style:italic">.Anchor after block name for contiguous block</span> |
| 565 |
<span style="color:#006e28">[literal]</span> |
| 566 |
<span style="color:#644a9b">[[contiguous_block_id_after_name]]</span> |
| 567 |
<span style="color:#607880">Inside the block.</span> |
| 568 |
|
| 569 |
<span style="color:#bf0303;font-style:italic">.Anchor after block name for delimited block</span> |
| 570 |
<span style="color:#006e28">[literal]</span> |
| 571 |
<span style="color:#644a9b">[#delimited_block_id]</span> |
| 572 |
<span style="color:#006e28;font-weight:bold">....</span> |
| 573 |
<span style="color:#607880">Inside the block.</span> |
| 574 |
<span style="color:#006e28;font-weight:bold">....</span> |
| 575 |
|
| 576 |
<span style="color:#bf0303;font-style:italic">.Option definition</span> |
| 577 |
<span style="color:#006e28">[literal%some-option, some, attributes]</span> |
| 578 |
<span style="color:#607880">Inside the block.</span> |
| 579 |
|
| 580 |
<span style="color:#bf0303;font-style:italic">.Shorthand anchor definition</span> |
| 581 |
<span style="color:#898887">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#898887"> Would be nice if we could highligth the shorthand ID definition as such.</span> |
| 582 |
<span style="color:#006e28">[literal#shorthand-id, some, attributes]</span> |
| 583 |
<span style="color:#607880">Inside the block.</span> |
| 584 |
|
| 585 |
Link to <span style="color:#0057ae;text-decoration:underline"><<contiguous_block_id_before_name>></span>. |
| 586 |
|
| 587 |
Link to <span style="color:#0057ae;text-decoration:underline"><<contiguous_block_id_after_name>></span>. |
| 588 |
|
| 589 |
Link to <span style="color:#0057ae;text-decoration:underline"><<shorthand-id>></span>. |
| 590 |
|
| 591 |
|
| 592 |
<span style="color:#bf0303;font-weight:bold">== Admonition</span> |
| 593 |
|
| 594 |
See <span style="color:#607880">`admonition.adoc`</span>. |
| 595 |
|
| 596 |
|
| 597 |
<span style="color:#bf0303;font-weight:bold">== Comment</span> |
| 598 |
|
| 599 |
See <span style="color:#607880">`comment.adoc`</span>. |
| 600 |
|
| 601 |
|
| 602 |
<span style="color:#bf0303;font-weight:bold">== Example</span> |
| 603 |
|
| 604 |
<span style="color:#bf0303;font-style:italic">.Contiguous</span> |
| 605 |
<span style="color:#006e28">[example]</span> |
| 606 |
<span style="color:#644a9b">[[example-block-id]]</span> |
| 607 |
A countiguous <span style="font-weight:bold">*example*</span> block. |
| 608 |
<span style="color:#898887">// some comment</span> |
| 609 |
Second line of the example block. |
| 610 |
|
| 611 |
This line is not part of the contiguous example block anymore. |
| 612 |
|
| 613 |
<span style="color:#bf0303;font-style:italic">.Delimited with block name</span> |
| 614 |
<span style="color:#006e28">[example]</span> |
| 615 |
<span style="color:#898887">// some comment</span> |
| 616 |
<span style="color:#644a9b">[[example-block-id]]</span> |
| 617 |
<span style="color:#898887">// some comment</span> |
| 618 |
<span style="color:#006e28;font-weight:bold">====</span> |
| 619 |
<span style="color:#898887">// some comment</span> |
| 620 |
Inside the delimited example block. |
| 621 |
<span style="color:#006e28;font-weight:bold">====</span> |
| 622 |
|
| 623 |
<span style="color:#bf0303;font-style:italic">.Delimited without block name</span> |
| 624 |
<span style="color:#644a9b">[[example-block-id]]</span> |
| 625 |
<span style="color:#006e28;font-weight:bold">====</span> |
| 626 |
Inside the delimited example block. |
| 627 |
<span style="color:#006e28;font-weight:bold">====</span> |
| 628 |
|
| 629 |
<span style="color:#bf0303;font-style:italic">.Using an open block</span> |
| 630 |
<span style="color:#006e28">[example]</span> |
| 631 |
<span style="color:#644a9b">[[example-block-id]]</span> |
| 632 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 633 |
Inside the open block example. |
| 634 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 635 |
|
| 636 |
|
| 637 |
<span style="color:#bf0303;font-weight:bold">== Fenced</span> |
| 638 |
|
| 639 |
<span style="color:#006e28">NOTE:</span> According to the <span style="color:#0057ae;text-decoration:underline">https://asciidoctor.org/docs/user-manual/#built-in-blocks-summary[Asciidoctor manual]</span>, fenced blocks do not support block names. |
| 640 |
|
| 641 |
<span style="color:#bf0303;font-style:italic">.Delimited without block name</span> |
| 642 |
<span style="color:#644a9b">[#fenced-block-id]</span> |
| 643 |
<span style="color:#006e28;font-weight:bold">```</span> |
| 644 |
<span style="color:#607880">Inside the fenced block.</span> |
| 645 |
<span style="color:#607880">The block contents is rendered verbatim.</span> |
| 646 |
<span style="color:#607880">So there is *no* text formatting.</span> |
| 647 |
<span style="color:#006e28;font-weight:bold">```</span> |
| 648 |
|
| 649 |
<span style="color:#bf0303;font-style:italic">.This is not a fenced block</span> |
| 650 |
<span style="color:#607880">``````</span> |
| 651 |
A fenced block<span style="font-weight:bold;text-decoration:underline">'</span>s delimiter length is <span style="font-style:italic">_exactly_</span> 3. |
| 652 |
<span style="color:#607880">``````</span> |
| 653 |
|
| 654 |
|
| 655 |
<span style="color:#bf0303;font-weight:bold">== Listing</span> |
| 656 |
|
| 657 |
<span style="color:#bf0303;font-style:italic">.Contiguous</span> |
| 658 |
<span style="color:#006e28">[listing]</span> |
| 659 |
<span style="color:#644a9b">[[listing-block-id]]</span> |
| 660 |
<span style="color:#607880">A countiguous *listing* block.</span> |
| 661 |
<span style="color:#607880">Last line of the listing.</span> |
| 662 |
|
| 663 |
This line is not part of the contiguous block anymore. |
| 664 |
|
| 665 |
<span style="color:#bf0303;font-style:italic">.Delimited with block name</span> |
| 666 |
<span style="color:#006e28">[listing]</span> |
| 667 |
<span style="color:#644a9b">[[listing-block-id]]</span> |
| 668 |
<span style="color:#898887">// comment before the opening block delimiter</span> |
| 669 |
<span style="color:#898887">////</span> |
| 670 |
<span style="color:#898887">block comment</span> |
| 671 |
<span style="color:#898887">////</span> |
| 672 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 673 |
<span style="color:#607880">First line inside the *listing* block.</span> |
| 674 |
<span style="color:#607880">Last line inside the block.</span> |
| 675 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 676 |
|
| 677 |
<span style="color:#bf0303;font-style:italic">.Delimited without block name</span> |
| 678 |
<span style="color:#644a9b">[[listing-block-id]]</span> |
| 679 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 680 |
<span style="color:#607880">Inside the delimited listing block.</span> |
| 681 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 682 |
|
| 683 |
<span style="color:#bf0303;font-style:italic">.Using an open block</span> |
| 684 |
<span style="color:#006e28">[listing]</span> |
| 685 |
<span style="color:#644a9b">[[listing-block-id]]</span> |
| 686 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 687 |
<span style="color:#607880">Inside the open block listing.</span> |
| 688 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 689 |
|
| 690 |
|
| 691 |
<span style="color:#bf0303;font-weight:bold">== Literal</span> |
| 692 |
|
| 693 |
<span style="color:#bf0303;font-style:italic">.Contiguous</span> |
| 694 |
<span style="color:#006e28">[literal]</span> |
| 695 |
<span style="color:#898887">// some comment</span> |
| 696 |
<span style="color:#644a9b">[[literal-block-id]]</span> |
| 697 |
<span style="color:#898887">// some comment</span> |
| 698 |
<span style="color:#607880">Inside the contiguous literal block.</span> |
| 699 |
<span style="color:#607880">// this should not be highlighted as comment</span> |
| 700 |
<span style="color:#607880">.this should not be highlighted as title</span> |
| 701 |
<span style="color:#607880">The block contents is rendered verbatim.</span> |
| 702 |
<span style="color:#607880">So there is *no* text formatting.</span> |
| 703 |
<span style="color:#607880">// this should not be highlighted as comment</span> |
| 704 |
|
| 705 |
This line is not part of the contiguous block anymore. |
| 706 |
|
| 707 |
<span style="color:#bf0303;font-style:italic">.Delimited with block name</span> |
| 708 |
<span style="color:#006e28">[literal]</span> |
| 709 |
<span style="color:#898887">// some comment</span> |
| 710 |
<span style="color:#644a9b">[#literal-block-id]</span> |
| 711 |
<span style="color:#898887">// some comment</span> |
| 712 |
<span style="color:#006e28;font-weight:bold">..........</span> |
| 713 |
<span style="color:#607880">Inside the delimited literal block.</span> |
| 714 |
<span style="color:#607880">// this should not be highlighted as comment</span> |
| 715 |
<span style="color:#607880">.this should not be highlighted as title</span> |
| 716 |
<span style="color:#006e28;font-weight:bold">..........</span> |
| 717 |
|
| 718 |
<span style="color:#bf0303;font-style:italic">.Delimited without block name</span> |
| 719 |
<span style="color:#644a9b">[[literal-block-id]]</span> |
| 720 |
<span style="color:#898887">// some comment</span> |
| 721 |
<span style="color:#006e28;font-weight:bold">..........</span> |
| 722 |
<span style="color:#607880">Inside the delimited literal block.</span> |
| 723 |
<span style="color:#006e28;font-weight:bold">..........</span> |
| 724 |
|
| 725 |
<span style="color:#bf0303;font-style:italic">.Using an open block</span> |
| 726 |
<span style="color:#006e28">[literal]</span> |
| 727 |
<span style="color:#898887">// some comment</span> |
| 728 |
<span style="color:#644a9b">[[literal-block-id]]</span> |
| 729 |
<span style="color:#898887">// some comment</span> |
| 730 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 731 |
<span style="color:#607880">// this should not be highlighted as comment</span> |
| 732 |
<span style="color:#607880">Inside the open block listing.</span> |
| 733 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 734 |
|
| 735 |
<span style="color:#bf0303;font-style:italic">.Using leading spaces for first line</span> |
| 736 |
<span style="color:#607880"> When using some leading spaces, the whole paragraph is treated as literal.</span> |
| 737 |
<span style="color:#607880">Only the first line needs to have leading spaces.</span> |
| 738 |
|
| 739 |
This line is not part of the literal paragraph anymore. |
| 740 |
|
| 741 |
|
| 742 |
<span style="color:#bf0303;font-weight:bold">== Open</span> |
| 743 |
|
| 744 |
<span style="color:#006e28">NOTE:</span> The open block does not have a contiguous form. |
| 745 |
|
| 746 |
<span style="color:#bf0303;font-style:italic">.Delimited</span> |
| 747 |
<span style="color:#644a9b">[#open-block-id]</span> |
| 748 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 749 |
An open block<span style="font-weight:bold;text-decoration:underline">'</span>s delimiter length is <span style="font-style:italic">_exactly_</span> 2. |
| 750 |
|
| 751 |
Last line of the <span style="color:#b08000">#open#</span> block. |
| 752 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 753 |
|
| 754 |
|
| 755 |
<span style="color:#bf0303;font-weight:bold">== Passthrough</span> |
| 756 |
|
| 757 |
<span style="color:#bf0303;font-style:italic">.Contiguous</span> |
| 758 |
<span style="color:#006e28">[pass]</span> |
| 759 |
<span style="color:#644a9b">[[contiguous-passthrough-id]]</span> |
| 760 |
<span style="color:#ff5500">Inside the contiguous passthrough block.</span> |
| 761 |
<span style="color:#ff5500">Second line to pass trhough.</span> |
| 762 |
|
| 763 |
This line is not part of the contiguous passthrough block anymore. |
| 764 |
|
| 765 |
<span style="color:#bf0303;font-style:italic">.Delimited with block name</span> |
| 766 |
<span style="color:#006e28">[pass]</span> |
| 767 |
<span style="color:#644a9b">[[delimited-passthrough-id]]</span> |
| 768 |
<span style="color:#006e28;font-weight:bold">++++++</span> |
| 769 |
<span style="color:#ff5500">Inside the delimited passthrough block with block name.</span> |
| 770 |
<span style="color:#006e28;font-weight:bold">++++++</span> |
| 771 |
|
| 772 |
<span style="color:#bf0303;font-style:italic">.Delimited without block name</span> |
| 773 |
<span style="color:#644a9b">[[delimited-passthrough-id]]</span> |
| 774 |
<span style="color:#006e28;font-weight:bold">++++</span> |
| 775 |
<span style="color:#ff5500">Inside the delimited passthrough block without block name.</span> |
| 776 |
<span style="color:#006e28;font-weight:bold">++++</span> |
| 777 |
|
| 778 |
According to the <span style="color:#0057ae;text-decoration:underline">https://asciidoctor.org/docs/user-manual/#built-in-blocks-summary[Asciidoctor Manual]</span>, passthrough using an open block is not supported. |
| 779 |
|
| 780 |
|
| 781 |
<span style="color:#bf0303;font-weight:bold">== Quote</span> |
| 782 |
|
| 783 |
See <span style="color:#607880">`quote_verse.adoc`</span>. |
| 784 |
|
| 785 |
|
| 786 |
<span style="color:#bf0303;font-weight:bold">== Sidebar</span> |
| 787 |
|
| 788 |
<span style="color:#bf0303;font-style:italic">.Contiguous</span> |
| 789 |
<span style="color:#006e28">[sidebar]</span> |
| 790 |
<span style="color:#644a9b">[[sidebar-block-id]]</span> |
| 791 |
Inside the <span style="font-weight:bold">*sidebar*</span> block. |
| 792 |
Second line of the sidebar block. |
| 793 |
|
| 794 |
This line is not part of the sidbar block anymore. |
| 795 |
|
| 796 |
<span style="color:#bf0303;font-style:italic">.Delimited with block name</span> |
| 797 |
<span style="color:#006e28">[sidebar]</span> |
| 798 |
<span style="color:#644a9b">[[sidebar-block-id]]</span> |
| 799 |
<span style="color:#006e28;font-weight:bold">**********</span> |
| 800 |
Inside the <span style="font-weight:bold">*sidebar*</span> block. |
| 801 |
<span style="color:#006e28;font-weight:bold">**********</span> |
| 802 |
|
| 803 |
<span style="color:#bf0303;font-style:italic">.Delimited without block name</span> |
| 804 |
<span style="color:#644a9b">[[sidebar-block-id]]</span> |
| 805 |
<span style="color:#006e28;font-weight:bold">****</span> |
| 806 |
Inside the sidebar block. |
| 807 |
<span style="color:#006e28;font-weight:bold">****</span> |
| 808 |
|
| 809 |
<span style="color:#bf0303;font-style:italic">.Using an open block</span> |
| 810 |
<span style="color:#006e28">[sidebar]</span> |
| 811 |
<span style="color:#644a9b">[[sidebar-block-id]]</span> |
| 812 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 813 |
Inside the sidebar block. |
| 814 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 815 |
|
| 816 |
|
| 817 |
<span style="color:#bf0303;font-weight:bold">== Source</span> |
| 818 |
|
| 819 |
<span style="color:#bf0303;font-style:italic">.Contiguous</span> |
| 820 |
<span style="color:#006e28">[source,ruby]</span> |
| 821 |
<span style="color:#644a9b">[[source-block-id]]</span> |
| 822 |
<span style="color:#607880">#This is Ruby source code.</span> |
| 823 |
<span style="color:#607880">#NOTE: If there is a space after the `#`, Asciidoctor interprets this as a section title.</span> |
| 824 |
<span style="color:#607880">#Seems in contiguous source blocks, Asciidoctor still interprets the block contents, which is rather unexpected.</span> |
| 825 |
<span style="color:#607880">import 'needed'</span> |
| 826 |
<span style="color:#607880">IO.puts "hello"</span> |
| 827 |
|
| 828 |
<span style="color:#bf0303;font-style:italic">.Contiguous using option syntax</span> |
| 829 |
<span style="color:#006e28">[source%mixed,php]</span> |
| 830 |
<span style="color:#607880"><p></span> |
| 831 |
<span style="color:#607880"><?php echo "Hello, World!"; ?></span> |
| 832 |
<span style="color:#607880"></p></span> |
| 833 |
|
| 834 |
<span style="color:#bf0303;font-style:italic">.Delimited with block name</span> |
| 835 |
<span style="color:#006e28">[source , ruby ]</span> |
| 836 |
<span style="color:#644a9b">[[source-block-id]]</span> |
| 837 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 838 |
<span style="color:#607880"># This is Ruby source code.</span> |
| 839 |
<span style="color:#607880"># NOTE: in delimited source blocks, having a space after the `#` in the comment is OK.</span> |
| 840 |
<span style="color:#607880">import 'needed'</span> |
| 841 |
|
| 842 |
<span style="color:#607880">IO.puts "hello"</span> |
| 843 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 844 |
|
| 845 |
<span style="color:#bf0303;font-style:italic">.Delimited with block name using option syntax</span> |
| 846 |
<span style="color:#006e28">[source%mixed,php]</span> |
| 847 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 848 |
<span style="color:#607880"><p></span> |
| 849 |
<span style="color:#607880"><?php echo "Hello, World!"; ?></span> |
| 850 |
<span style="color:#607880"></p></span> |
| 851 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 852 |
|
| 853 |
<span style="color:#bf0303;font-style:italic">.Delimited with block name using option syntax on next line</span> |
| 854 |
<span style="color:#006e28">[source]</span> |
| 855 |
<span style="color:#006e28">[options="nowrap"]</span> |
| 856 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 857 |
<span style="color:#607880"><p></span> |
| 858 |
<span style="color:#607880"><?php echo "Hello, World!"; ?></span> |
| 859 |
<span style="color:#607880"></p></span> |
| 860 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 861 |
|
| 862 |
<span style="color:#bf0303;font-style:italic">.Delimited without block name</span> |
| 863 |
<span style="color:#644a9b">[[source-block-id]]</span> |
| 864 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 865 |
<span style="color:#607880"># This is Ruby source code.</span> |
| 866 |
<span style="color:#607880"># NOTE: in delimited source blocks, having a space after the `#` in the comment is OK.</span> |
| 867 |
<span style="color:#607880">import 'needed'</span> |
| 868 |
|
| 869 |
<span style="color:#607880">IO.puts "hello"</span> |
| 870 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 871 |
|
| 872 |
<span style="color:#bf0303;font-style:italic">.Using an open block</span> |
| 873 |
<span style="color:#006e28">[source,ruby]</span> |
| 874 |
<span style="color:#644a9b">[[source-block-id]]</span> |
| 875 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 876 |
<span style="color:#607880">import 'needed'</span> |
| 877 |
|
| 878 |
<span style="color:#607880">IO.puts "hello"</span> |
| 879 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 880 |
|
| 881 |
|
| 882 |
<span style="color:#bf0303;font-weight:bold">== Stem</span> |
| 883 |
|
| 884 |
<span style="color:#bf0303;font-style:italic">.Contiguous</span> |
| 885 |
<span style="color:#006e28">[stem]</span> |
| 886 |
<span style="color:#644a9b">[[stem-block-id]]</span> |
| 887 |
<span style="color:#ff5500">Inside the contiguous stem block.</span> |
| 888 |
<span style="color:#ff5500">Second line to pass.</span> |
| 889 |
|
| 890 |
This line is not part of the contiguous Passthrough block anymore. |
| 891 |
|
| 892 |
<span style="color:#bf0303;font-style:italic">.Delimited with block name</span> |
| 893 |
<span style="color:#006e28">[stem]</span> |
| 894 |
<span style="color:#644a9b">[[stem-block-id]]</span> |
| 895 |
<span style="color:#006e28;font-weight:bold">++++++</span> |
| 896 |
<span style="color:#ff5500">Inside the delimited stem block with block name.</span> |
| 897 |
<span style="color:#006e28;font-weight:bold">++++++</span> |
| 898 |
|
| 899 |
<span style="color:#bf0303;font-style:italic">.Delimited without block name</span> |
| 900 |
<span style="color:#644a9b">[[stem-block-id]]</span> |
| 901 |
<span style="color:#006e28;font-weight:bold">++++</span> |
| 902 |
<span style="color:#ff5500">Inside the delimited stem block without block name.</span> |
| 903 |
<span style="color:#006e28;font-weight:bold">++++</span> |
| 904 |
|
| 905 |
|
| 906 |
<span style="color:#bf0303;font-weight:bold">== Table</span> |
| 907 |
|
| 908 |
See <span style="color:#607880">`table.adoc`</span>. |
| 909 |
|
| 910 |
|
| 911 |
<span style="color:#bf0303;font-weight:bold">== Verse</span> |
| 912 |
|
| 913 |
<span style="color:#bf0303;font-style:italic">.Contiguous</span> |
| 914 |
<span style="color:#006e28">[verse]</span> |
| 915 |
<span style="color:#644a9b">[[verse-block-id]]</span> |
| 916 |
Inside the <span style="font-weight:bold">*verse*</span> block. |
| 917 |
Second line of the verse block. |
| 918 |
|
| 919 |
This line is not part of the contiguous verse block anymore. |
| 920 |
|
| 921 |
<span style="color:#bf0303;font-style:italic">.Delimited with block name</span> |
| 922 |
<span style="color:#006e28">[verse]</span> |
| 923 |
<span style="color:#644a9b">[[verse-block-id]]</span> |
| 924 |
<span style="color:#006e28;font-weight:bold">____</span> |
| 925 |
Inside the <span style="font-weight:bold">*verse*</span> block. |
| 926 |
<span style="color:#006e28;font-weight:bold">____</span> |
| 927 |
|
| 928 |
<span style="color:#bf0303;font-style:italic">.Delimited without block name</span> |
| 929 |
This would be rendered as a quote block as the same delimiters are used. |
| 930 |
|
| 931 |
<span style="color:#bf0303;font-style:italic">.Using an open block</span> |
| 932 |
<span style="color:#006e28">[verse]</span> |
| 933 |
<span style="color:#644a9b">[[verse-block-id]]</span> |
| 934 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 935 |
Inside the <span style="font-weight:bold">*verse*</span> block. |
| 936 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 937 |
|
| 938 |
|
| 939 |
<span style="color:#bf0303;font-weight:bold">== Nested Blocks</span> |
| 940 |
|
| 941 |
<span style="color:#006e28;font-weight:bold">====</span> |
| 942 |
Start of outer example block. |
| 943 |
|
| 944 |
<span style="color:#bf0303;font-style:italic">.Nested example block</span> |
| 945 |
<span style="color:#006e28;font-weight:bold">=====</span> |
| 946 |
Inside the inner example block. |
| 947 |
<span style="color:#898887">// some comment</span> |
| 948 |
|
| 949 |
<span style="color:#bf0303;font-style:italic">.Nested literal block</span> |
| 950 |
<span style="color:#006e28">[literal]</span> |
| 951 |
<span style="color:#898887">// some comment</span> |
| 952 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 953 |
<span style="color:#607880">Inside the literal block within the inner example block.</span> |
| 954 |
<span style="color:#607880">--</span> |
| 955 |
<span style="color:#607880">Trying to use a block within a verbatim block results in verbatim text, of course.</span> |
| 956 |
<span style="color:#607880">--</span> |
| 957 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 958 |
<span style="color:#006e28;font-weight:bold">=====</span> |
| 959 |
Line in outer block. |
| 960 |
<span style="color:#006e28">[listing]</span> |
| 961 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 962 |
<span style="color:#607880">Inside the inner listing block.</span> |
| 963 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 964 |
End of outer block. |
| 965 |
<span style="color:#006e28;font-weight:bold">====</span> |
| 966 |
|
| 967 |
<span style="color:#bf0303;font-style:italic">.Admonition inside some other block</span> |
| 968 |
<span style="color:#006e28;font-weight:bold">====</span> |
| 969 |
Some text. |
| 970 |
|
| 971 |
<span style="color:#006e28">NOTE:</span> This is a note in simple format inside a block. |
| 972 |
|
| 973 |
Some more text. |
| 974 |
<span style="color:#006e28;font-weight:bold">====</span> |
| 975 |
|
| 976 |
|
| 977 |
<span style="color:#bf0303;font-weight:bold">= Callout</span> |
| 978 |
<span style="color:#898887">// Add `:icons: font` for nice callout icons.</span> |
| 979 |
|
| 980 |
Callouts are usually used with listing/source blocks, but Asciidoctor renders them also without a listing block. |
| 981 |
|
| 982 |
<span style="font-weight:bold;text-decoration:underline"><1></span> This is a callout. |
| 983 |
<span style="font-weight:bold;text-decoration:underline"><.></span> This is a callout too. |
| 984 |
|
| 985 |
<span style="color:#607880"> <2> This is not rendered as a callout as it is indented.</span> |
| 986 |
|
| 987 |
The line below is not rendered as a callout as it has no text in the same line. |
| 988 |
|
| 989 |
<3> |
| 990 |
|
| 991 |
The line below is not rendered as callout as it is part of this paragraph. |
| 992 |
<4> This should <span style="font-style:italic">_not_</span> be highlighted as callout. |
| 993 |
|
| 994 |
<span style="color:#bf0303;font-style:italic">.Callouts with manual numbering</span> |
| 995 |
<span style="color:#006e28">[source,sh]</span> |
| 996 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 997 |
<span style="color:#607880">ls -l <2></span> |
| 998 |
<span style="color:#607880">ls -la <1></span> |
| 999 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 1000 |
<span style="font-weight:bold;text-decoration:underline"><1></span> Explanation for callout number 1. |
| 1001 |
<span style="font-weight:bold;text-decoration:underline"><2></span> Explanation for callout number 2. |
| 1002 |
\<3> This is not a callout as it is escaped. |
| 1003 |
|
| 1004 |
<span style="color:#bf0303;font-style:italic">.Callouts with automatic numbering</span> |
| 1005 |
<span style="color:#006e28">[source,sh]</span> |
| 1006 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 1007 |
<span style="color:#607880">ls -l <.></span> |
| 1008 |
<span style="color:#607880">ls -la <.></span> |
| 1009 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 1010 |
<span style="font-weight:bold;text-decoration:underline"><.></span> Explanation for callout number 1. |
| 1011 |
<span style="font-weight:bold;text-decoration:underline"><.></span> Explanation for callout number 2. |
| 1012 |
|
| 1013 |
|
| 1014 |
<span style="color:#bf0303;font-weight:bold">= Comment</span> |
| 1015 |
|
| 1016 |
<span style="color:#006e28">TIP:</span> Comment highlighting supports the standard <span style="color:#0057ae;text-decoration:underline">https://cgit.kde.org/syntax-highlighting.git/tree/data/syntax/alert.xml[KDE alerts]</span> (TODO, FIXME, <span style="font-weight:bold;text-decoration:underline">...</span>) in both single-line and multi-line comments. |
| 1017 |
|
| 1018 |
|
| 1019 |
<span style="color:#bf0303;font-weight:bold">== Single Line</span> |
| 1020 |
|
| 1021 |
Single-line comments start with exactly <span style="color:#607880">`//`</span>. |
| 1022 |
If there are any characters - including spaces - before the <span style="color:#607880">`//`</span>, the line will be rendered. |
| 1023 |
If there are more than two consecutive <span style="color:#607880">`/`</span>, the line will be rendered. |
| 1024 |
|
| 1025 |
This line // will be rendered completely. |
| 1026 |
|
| 1027 |
<span style="color:#607880"> // This line will be rendered as verbatim text as it is indented.</span> |
| 1028 |
|
| 1029 |
/// This line will be rendered as it starts with 3 <span style="color:#607880">`/`</span>. |
| 1030 |
|
| 1031 |
<span style="color:#898887">// This line will be invisible.</span> |
| 1032 |
|
| 1033 |
<span style="color:#898887">//This line will be invisible.</span> |
| 1034 |
|
| 1035 |
<span style="color:#898887">//</span> |
| 1036 |
|
| 1037 |
\// Escaped comment. |
| 1038 |
|
| 1039 |
\// TODO Of course there is no alert highlighting in escaped comments. |
| 1040 |
|
| 1041 |
<span style="color:#bf0303;font-style:italic">.Alerts</span> |
| 1042 |
<span style="color:#898887">// </span><span style="color:#81ca2d;background-color:#f7e6e6;font-weight:bold">NOTE</span><span style="color:#898887"> testing alerts</span> |
| 1043 |
<span style="color:#898887">// </span><span style="color:#81ca2d;background-color:#f7e6e6;font-weight:bold">TEST</span><span style="color:#898887">: testing alerts</span> |
| 1044 |
<span style="color:#898887">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#898887">: testing alerts</span> |
| 1045 |
<span style="color:#898887">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TASK</span><span style="color:#898887"> testing alerts</span> |
| 1046 |
<span style="color:#898887">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">WARNING</span><span style="color:#898887">: testing alerts</span> |
| 1047 |
<span style="color:#898887">// </span><span style="color:#e85848;background-color:#451e1a;font-weight:bold">ALERT</span><span style="color:#898887">: testing alerts</span> |
| 1048 |
<span style="color:#898887">// </span><span style="color:#e85848;background-color:#451e1a;font-weight:bold">DANGER</span><span style="color:#898887">: testing alerts</span> |
| 1049 |
|
| 1050 |
|
| 1051 |
<span style="color:#bf0303;font-weight:bold">== Multi Line</span> |
| 1052 |
|
| 1053 |
<span style="color:#bf0303;font-style:italic">.Contiguous block</span> |
| 1054 |
<span style="color:#006e28">[comment]</span> |
| 1055 |
<span style="color:#898887">Some comment.</span> |
| 1056 |
<span style="color:#898887">Alerts:</span> |
| 1057 |
<span style="color:#81ca2d;background-color:#f7e6e6;font-weight:bold">NOTE</span><span style="color:#898887"> testing alerts</span> |
| 1058 |
<span style="color:#81ca2d;background-color:#f7e6e6;font-weight:bold">TEST</span><span style="color:#898887">: testing alerts</span> |
| 1059 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#898887">: testing alerts</span> |
| 1060 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TASK</span><span style="color:#898887"> testing alerts</span> |
| 1061 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">WARNING</span><span style="color:#898887">: testing alerts</span> |
| 1062 |
<span style="color:#e85848;background-color:#451e1a;font-weight:bold">ALERT</span><span style="color:#898887">: testing alerts</span> |
| 1063 |
<span style="color:#e85848;background-color:#451e1a;font-weight:bold">DANGER</span><span style="color:#898887">: testing alerts</span> |
| 1064 |
<span style="color:#898887">Last line of contiguous block comment.</span> |
| 1065 |
|
| 1066 |
This line is not part of the contiguous block comment anymore. |
| 1067 |
|
| 1068 |
<span style="color:#bf0303;font-style:italic">.Delimited block without name</span> |
| 1069 |
<span style="color:#898887">//////</span> |
| 1070 |
<span style="color:#898887">This is a multi-line comment.</span> |
| 1071 |
<span style="color:#898887">It spans multiple lines.</span> |
| 1072 |
|
| 1073 |
<span style="color:#898887">Alerts:</span> |
| 1074 |
<span style="color:#81ca2d;background-color:#f7e6e6;font-weight:bold">NOTE</span><span style="color:#898887"> testing alerts</span> |
| 1075 |
<span style="color:#81ca2d;background-color:#f7e6e6;font-weight:bold">TEST</span><span style="color:#898887">: testing alerts</span> |
| 1076 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#898887">: testing alerts</span> |
| 1077 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TASK</span><span style="color:#898887"> testing alerts</span> |
| 1078 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">WARNING</span><span style="color:#898887">: testing alerts</span> |
| 1079 |
<span style="color:#e85848;background-color:#451e1a;font-weight:bold">ALERT</span><span style="color:#898887">: testing alerts</span> |
| 1080 |
<span style="color:#e85848;background-color:#451e1a;font-weight:bold">DANGER</span><span style="color:#898887">: testing alerts</span> |
| 1081 |
|
| 1082 |
<span style="color:#898887">This is the comment's last line.</span> |
| 1083 |
<span style="color:#898887">//////</span> |
| 1084 |
|
| 1085 |
<span style="color:#006e28">[comment]</span> |
| 1086 |
<span style="color:#bf0303;font-style:italic">.Delimited block with name</span> |
| 1087 |
<span style="color:#898887">////</span> |
| 1088 |
<span style="color:#898887">This is a multi-line comment.</span> |
| 1089 |
<span style="color:#898887">It spans multiple lines.</span> |
| 1090 |
|
| 1091 |
<span style="color:#898887">Alerts:</span> |
| 1092 |
<span style="color:#81ca2d;background-color:#f7e6e6;font-weight:bold">NOTE</span><span style="color:#898887"> testing alerts</span> |
| 1093 |
<span style="color:#81ca2d;background-color:#f7e6e6;font-weight:bold">TEST</span><span style="color:#898887">: testing alerts</span> |
| 1094 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#898887">: testing alerts</span> |
| 1095 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TASK</span><span style="color:#898887"> testing alerts</span> |
| 1096 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">WARNING</span><span style="color:#898887">: testing alerts</span> |
| 1097 |
<span style="color:#e85848;background-color:#451e1a;font-weight:bold">ALERT</span><span style="color:#898887">: testing alerts</span> |
| 1098 |
<span style="color:#e85848;background-color:#451e1a;font-weight:bold">DANGER</span><span style="color:#898887">: testing alerts</span> |
| 1099 |
|
| 1100 |
<span style="color:#898887">This is the comment's last line.</span> |
| 1101 |
<span style="color:#898887">////</span> |
| 1102 |
|
| 1103 |
<span style="color:#bf0303;font-style:italic">.Using open block</span> |
| 1104 |
<span style="color:#006e28">[comment]</span> |
| 1105 |
<span style="color:#898887">--</span> |
| 1106 |
<span style="color:#898887">Inside the open block comment.</span> |
| 1107 |
<span style="color:#898887">--</span> |
| 1108 |
|
| 1109 |
|
| 1110 |
<span style="color:#bf0303;font-weight:bold">= Counter</span> |
| 1111 |
|
| 1112 |
<span style="color:#bf0303;font-weight:bold">== Use and Render</span> |
| 1113 |
|
| 1114 |
<span style="color:#bf0303;font-style:italic">.Start with 1 and render value</span> |
| 1115 |
New value for <span style="color:#607880">`c1`</span> is <span style="color:#0057ae">{counter:c1}</span>. |
| 1116 |
|
| 1117 |
<span style="color:#bf0303;font-style:italic">.Increment and render</span> |
| 1118 |
And now it is <span style="color:#0057ae">{counter:c1}</span>. |
| 1119 |
|
| 1120 |
<span style="color:#bf0303;font-style:italic">.Render the current value without changing it</span> |
| 1121 |
Current value is <span style="color:#0057ae">{c1}</span>. |
| 1122 |
|
| 1123 |
|
| 1124 |
<span style="color:#bf0303;font-weight:bold">== Use Without Rendering</span> |
| 1125 |
|
| 1126 |
<span style="color:#bf0303;font-style:italic">.Define the new counter</span> |
| 1127 |
No new value to be <span style="color:#0057ae">{counter2:c2}</span>seen. |
| 1128 |
|
| 1129 |
<span style="color:#bf0303;font-style:italic">.Let's see the current value</span> |
| 1130 |
Current value is <span style="color:#0057ae">{c2}</span>. |
| 1131 |
|
| 1132 |
<span style="color:#bf0303;font-style:italic">.Increment</span> |
| 1133 |
No incremented value to be <span style="color:#0057ae">{counter2:c2}</span>seen. |
| 1134 |
|
| 1135 |
<span style="color:#bf0303;font-style:italic">.Let's see the current value</span> |
| 1136 |
Current value is <span style="color:#0057ae">{c2}</span>. |
| 1137 |
|
| 1138 |
|
| 1139 |
<span style="color:#bf0303;font-weight:bold">== Using a Start Value</span> |
| 1140 |
|
| 1141 |
<span style="color:#bf0303;font-style:italic">.Start with 3 and render value</span> |
| 1142 |
New value for <span style="color:#607880">`c3`</span> is <span style="color:#0057ae">{counter:c3:99}</span>. |
| 1143 |
|
| 1144 |
<span style="color:#bf0303;font-style:italic">.Increment and render</span> |
| 1145 |
And now it is <span style="color:#0057ae">{counter:c3}</span>. |
| 1146 |
|
| 1147 |
<span style="color:#bf0303;font-style:italic">.Works with characters too</span> |
| 1148 |
New value for <span style="color:#607880">`c4`</span> is <span style="color:#0057ae">{counter:c4:X}</span> |
| 1149 |
|
| 1150 |
<span style="color:#bf0303;font-style:italic">.Increment character counter and render</span> |
| 1151 |
And now it is <span style="color:#0057ae">{counter:c4}</span>. |
| 1152 |
|
| 1153 |
|
| 1154 |
<span style="color:#bf0303;font-weight:bold">== About using Spaces</span> |
| 1155 |
|
| 1156 |
<span style="color:#006e28">CAUTION:</span> If you leave spaces after the <span style="color:#607880">`:`</span> or before the closing <span style="color:#607880">`}`</span>, Asciidoctor will make them part of the counter attribute name. <span style="font-weight:bold;text-decoration:underline">+</span> |
| 1157 |
So it<span style="font-weight:bold;text-decoration:underline">'</span>s probably wise to avoid spaces here. |
| 1158 |
|
| 1159 |
<span style="color:#bf0303;font-style:italic">.Define a counter</span> |
| 1160 |
New value is <span style="color:#0057ae">{counter:c5}</span>. |
| 1161 |
|
| 1162 |
<span style="color:#bf0303;font-style:italic">.This is actually a new counter</span> |
| 1163 |
New value is <span style="color:#0057ae">{counter: c5}</span>. |
| 1164 |
|
| 1165 |
<span style="color:#bf0303;font-style:italic">.But you can't access that attribute</span> |
| 1166 |
Can<span style="font-weight:bold;text-decoration:underline">'</span>t just show the current value { c5} |
| 1167 |
|
| 1168 |
<span style="color:#bf0303;font-style:italic">.Only if we increment it</span> |
| 1169 |
Incremented value is <span style="color:#0057ae">{counter: c5}</span>. |
| 1170 |
|
| 1171 |
<span style="color:#bf0303;font-style:italic">.This is again a new counter</span> |
| 1172 |
New value is <span style="color:#0057ae">{counter: c5}</span>. |
| 1173 |
|
| 1174 |
<span style="color:#bf0303;font-style:italic">.This is also a new counter</span> |
| 1175 |
New value is <span style="color:#0057ae">{counter:c5 }</span>. |
| 1176 |
|
| 1177 |
<span style="color:#006e28">CAUTION:</span> Similar problems occur when using spaces around starting values. <span style="font-weight:bold;text-decoration:underline">+</span> |
| 1178 |
<span style="font-weight:bold">*Just don't use spaces*</span>. |
| 1179 |
|
| 1180 |
<span style="color:#bf0303;font-style:italic">.New counter with start value</span> |
| 1181 |
New value is <span style="color:#0057ae">{counter:c6: 9 }</span> |
| 1182 |
|
| 1183 |
<span style="color:#bf0303;font-style:italic">.But when trying to increment</span> |
| 1184 |
Incremented value is <span style="color:#0057ae">{counter:c6}</span> |
| 1185 |
|
| 1186 |
|
| 1187 |
|
| 1188 |
<span style="color:#bf0303;font-weight:bold">= Text Formatting</span> |
| 1189 |
|
| 1190 |
<span style="color:#006e28">TIP:</span> Asciidoctor uses also the term <span style="font-style:italic">_quoted text_</span>. |
| 1191 |
|
| 1192 |
<span style="color:#bf0303;font-weight:bold">== Custom Styles</span> |
| 1193 |
|
| 1194 |
<span style="color:#006e28">[big]#big text#</span> |
| 1195 |
|
| 1196 |
Some <span style="color:#006e28">[.big]#big text#</span>. |
| 1197 |
|
| 1198 |
Some <span style="color:#006e28">[big]#big and *strong* text#</span>. |
| 1199 |
|
| 1200 |
Some text with <span style="color:#006e28">[foo]#custom style#</span>. |
| 1201 |
|
| 1202 |
<span style="color:#006e28">[foo bar]#foo bar text#</span> |
| 1203 |
|
| 1204 |
before!<span style="color:#006e28">[big]#big text#</span> |
| 1205 |
|
| 1206 |
<span style="color:#006e28">[big]#big text#</span>!after |
| 1207 |
|
| 1208 |
<span style="color:#006e28">[big]##*text*##</span> |
| 1209 |
|
| 1210 |
<span style="color:#898887">////</span> |
| 1211 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#898887"> Highlighting differs.</span> |
| 1212 |
<span style="color:#898887">The phrase is rendered as marked.</span> |
| 1213 |
<span style="color:#898887">The trailing hash is therefore not visible.</span> |
| 1214 |
<span style="color:#898887">////</span> |
| 1215 |
<span style="color:#006e28">[big]###text##</span># |
| 1216 |
|
| 1217 |
<span style="color:#006e28">[fo[o]#some text#</span> |
| 1218 |
|
| 1219 |
|
| 1220 |
<span style="color:#006e28">[underline]_emphasized and underlined_</span> |
| 1221 |
|
| 1222 |
<span style="color:#006e28">[underline]__emphasized and underlined_</span> |
| 1223 |
|
| 1224 |
|
| 1225 |
<span style="color:#006e28">[underline]`monospaced and underlined`</span> |
| 1226 |
|
| 1227 |
<span style="color:#006e28">[underline]``monospaced and underlined``</span> |
| 1228 |
|
| 1229 |
|
| 1230 |
<span style="color:#006e28">[underline]*strong and underlined*</span> |
| 1231 |
|
| 1232 |
<span style="color:#006e28">[underline]**strong and underlined**</span> |
| 1233 |
|
| 1234 |
|
| 1235 |
<span style="color:#bf0303;font-weight:bold">=== Not rendered as custom style</span> |
| 1236 |
|
| 1237 |
[fo]o]<span style="color:#b08000">#not a custom style#</span> because of surplus <span style="color:#607880">`]`</span>. |
| 1238 |
|
| 1239 |
[big]not a phrase because of missing phrase markers. |
| 1240 |
|
| 1241 |
[big]# # because only spaces used as phrase. |
| 1242 |
|
| 1243 |
[big]# the phrase# because of leading space in phrase. |
| 1244 |
|
| 1245 |
[big]#the phrase # because of trailing space in phrase. |
| 1246 |
|
| 1247 |
Before[foo]<span style="color:#b08000">#the phrase#</span> because of missing non-word character before clause. |
| 1248 |
|
| 1249 |
Before [foo]#the phrase#after because of missing non-word character after clause. |
| 1250 |
|
| 1251 |
|
| 1252 |
<span style="color:#bf0303;font-weight:bold">=== Escaped</span> |
| 1253 |
|
| 1254 |
This is not \[underline]<span style="color:#b08000">#underlined text#</span>. |
| 1255 |
|
| 1256 |
|
| 1257 |
<span style="color:#bf0303;font-weight:bold">== Emphasized</span> |
| 1258 |
|
| 1259 |
<span style="color:#bf0303;font-weight:bold">=== Rendered formatted</span> |
| 1260 |
|
| 1261 |
This line contains a <span style="font-style:italic">_sequence_</span> of <span style="font-style:italic">_multiple emphasized_</span> words. |
| 1262 |
|
| 1263 |
This line contains a single <span style="font-style:italic">_emphasized_</span> word. |
| 1264 |
|
| 1265 |
This line contains a single <span style="font-style:italic">__emphasized_</span> word. |
| 1266 |
|
| 1267 |
This line contains a single <span style="font-style:italic">_emphasized__</span> word. |
| 1268 |
|
| 1269 |
The text within the brackets should be (<span style="font-style:italic">_emphasized_</span>), but the brackets themselves not. |
| 1270 |
|
| 1271 |
(<span style="font-style:italic">_emphasized_</span> [<span style="font-style:italic">_emphasized_</span> {<span style="font-style:italic">_emphasized_</span> |<span style="font-style:italic">_emphasized_</span> .<span style="font-style:italic">_emphasized_</span> ,<span style="font-style:italic">_emphasized_</span> !<span style="font-style:italic">_emphasized_</span> ?<span style="font-style:italic">_emphasized_</span> <span style="font-style:italic">_emphasized_</span>? |
| 1272 |
|
| 1273 |
<span style="font-style:italic">_emphasized_</span>) <span style="font-style:italic">_emphasized_</span>] <span style="font-style:italic">_emphasized_</span>} <span style="font-style:italic">_emphasized_</span>| <span style="font-style:italic">_emphasized_</span>. <span style="font-style:italic">_emphasized_</span>; <span style="font-style:italic">_emphasized_</span>, |
| 1274 |
|
| 1275 |
<span style="font-style:italic">_emphasized_</span>( <span style="font-style:italic">_emphasized_</span>( <span style="font-style:italic">_emphasized_</span>[ <span style="font-style:italic">_emphasized_</span>{ |
| 1276 |
|
| 1277 |
<span style="font-style:italic">_emphasized_</span>) |
| 1278 |
|
| 1279 |
<span style="font-style:italic">_emphasized_</span> |
| 1280 |
|
| 1281 |
<span style="font-style:italic">__aa__</span>bb |
| 1282 |
|
| 1283 |
aa<span style="font-style:italic">__bb__</span> |
| 1284 |
|
| 1285 |
aa<span style="font-style:italic">__bb _cc__</span>dd |
| 1286 |
|
| 1287 |
aa<span style="font-style:italic">__bb cc__</span>_dd |
| 1288 |
|
| 1289 |
aa<span style="font-style:italic">__ bb __</span>cc |
| 1290 |
|
| 1291 |
|
| 1292 |
<span style="color:#bf0303;font-weight:bold">=== Rendered as-is</span> |
| 1293 |
|
| 1294 |
This line does not contain _some emphasized _ text as there is a surplus space. |
| 1295 |
|
| 1296 |
This line does not contain_some emphasized_ text as there is a space missing. |
| 1297 |
|
| 1298 |
This line does not contain _some emphasized_text as there is a space missing. |
| 1299 |
|
| 1300 |
foo ;_emphasized_ :_emphasized_ }_emphasized_ |
| 1301 |
|
| 1302 |
;_emphasized_ |
| 1303 |
:_emphasized_ |
| 1304 |
}_emphasized_ |
| 1305 |
|
| 1306 |
<span style="color:#898887">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#898887"> Highlighting differs.</span> |
| 1307 |
In this line, there is some <span style="font-style:italic">___very emphasized___</span> text. |
| 1308 |
Asciidoctor renders it as normal text, just ignoring all the underscores. |
| 1309 |
That is a bit strange. |
| 1310 |
|
| 1311 |
|
| 1312 |
<span style="color:#bf0303;font-weight:bold">=== Escaped</span> |
| 1313 |
|
| 1314 |
Not \_emphasized_ as it is escaped. |
| 1315 |
|
| 1316 |
Still \_<span style="font-style:italic">_emphasized__</span> as only the outermost level is escaped. |
| 1317 |
|
| 1318 |
|
| 1319 |
<span style="color:#bf0303;font-weight:bold">== Marked</span> |
| 1320 |
|
| 1321 |
<span style="color:#bf0303;font-weight:bold">=== Rendered formatted</span> |
| 1322 |
|
| 1323 |
Some # marked # text. |
| 1324 |
|
| 1325 |
Works <span style="color:#b08000">#also for multiple words#</span>. |
| 1326 |
|
| 1327 |
Some <span style="color:#b08000">##marked#</span> text. |
| 1328 |
|
| 1329 |
Some <span style="color:#b08000">#marked#</span># text. |
| 1330 |
|
| 1331 |
Some <span style="color:#b08000">##marked##</span> text. |
| 1332 |
|
| 1333 |
Some[big]<span style="color:#b08000">#marked#</span> text. |
| 1334 |
Not rendered big but marked, because of missing space before <span style="color:#607880">`[big]`</span>. |
| 1335 |
|
| 1336 |
Works also for p<span style="color:#b08000">##art##</span>s of a word. |
| 1337 |
|
| 1338 |
p#<span style="color:#b08000">#art#</span>!s |
| 1339 |
|
| 1340 |
!<span style="color:#b08000">#marked#</span>! |
| 1341 |
|
| 1342 |
<span style="color:#b08000">#marked#</span> |
| 1343 |
|
| 1344 |
<span style="color:#b08000">##marked##</span> |
| 1345 |
|
| 1346 |
|
| 1347 |
<span style="color:#bf0303;font-weight:bold">=== Rendered as-is</span> |
| 1348 |
|
| 1349 |
Not rendered # marked# because of space after the leading hash. |
| 1350 |
|
| 1351 |
Not rendered #marked # because of space before the trailing hash. |
| 1352 |
|
| 1353 |
Not rendered#marked# as there is a space missing. |
| 1354 |
|
| 1355 |
Not rendered #marked#as there is a space missing. |
| 1356 |
|
| 1357 |
<span style="color:#607880"> This is #rendered# as a verbatim block as it is indented.</span> |
| 1358 |
|
| 1359 |
Some <span style="color:#006e28">[big]#big marked#</span> text. |
| 1360 |
|
| 1361 |
Some <span style="color:#006e28">[big]##big marked##</span> text. |
| 1362 |
|
| 1363 |
|
| 1364 |
<span style="color:#bf0303;font-weight:bold">=== Escaped</span> |
| 1365 |
|
| 1366 |
Not \#marked# as it is escaped. |
| 1367 |
|
| 1368 |
Still \#<span style="color:#b08000">#marked#</span># as only the outermost level is escaped. |
| 1369 |
|
| 1370 |
|
| 1371 |
<span style="color:#bf0303;font-weight:bold">== Monospaced</span> |
| 1372 |
|
| 1373 |
<span style="color:#bf0303;font-weight:bold">=== Rendered formatted</span> |
| 1374 |
|
| 1375 |
This line contains a <span style="color:#607880">`sequence of ` multiple monospaced`</span> words. |
| 1376 |
|
| 1377 |
This line contains a single <span style="color:#607880">`monospaced`</span> word. |
| 1378 |
|
| 1379 |
This line contains a single <span style="color:#607880">``monospaced`</span> word. |
| 1380 |
|
| 1381 |
This line contains a single <span style="color:#607880">`monospaced`</span>` word. |
| 1382 |
|
| 1383 |
The text within the brackets should be (<span style="color:#607880">`monospaced`</span>), but the brackets themselves not. |
| 1384 |
|
| 1385 |
before<span style="color:#607880">``monospaced``</span>after. |
| 1386 |
|
| 1387 |
<span style="color:#607880">`monospaced`</span> |
| 1388 |
|
| 1389 |
(<span style="color:#607880">`mono`</span> [<span style="color:#607880">`mono`</span> {<span style="color:#607880">`mono`</span> |<span style="color:#607880">`mono`</span> .<span style="color:#607880">`mono`</span> ,<span style="color:#607880">`mono`</span> !<span style="color:#607880">`mono`</span> ?<span style="color:#607880">`mono`</span> |
| 1390 |
|
| 1391 |
<span style="color:#607880">`mono`</span>) <span style="color:#607880">`mono`</span>) <span style="color:#607880">`mono`</span>] <span style="color:#607880">`mono`</span>} <span style="color:#607880">`mono`</span>| <span style="color:#607880">`mono`</span>. <span style="color:#607880">`mono`</span>; <span style="color:#607880">`mono`</span>, <span style="color:#607880">`mono`</span>? |
| 1392 |
|
| 1393 |
<span style="color:#607880">`mono`</span>( <span style="color:#607880">`mono`</span>( <span style="color:#607880">`mono`</span>[ <span style="color:#607880">`mono`</span>{ |
| 1394 |
|
| 1395 |
<span style="color:#607880">``aa``</span>bb |
| 1396 |
|
| 1397 |
aa<span style="color:#607880">``bb``</span> |
| 1398 |
|
| 1399 |
aa<span style="color:#607880">``bb `cc``</span>dd |
| 1400 |
|
| 1401 |
aa<span style="color:#607880">``bb cc``</span>`dd |
| 1402 |
|
| 1403 |
aa<span style="color:#607880">`` bb ``</span>cc |
| 1404 |
|
| 1405 |
|
| 1406 |
<span style="color:#bf0303;font-weight:bold">=== Rendered as-is</span> |
| 1407 |
|
| 1408 |
Not rendered ` monospaced` because of leading space. |
| 1409 |
|
| 1410 |
Not rendered `monospaced ` because of trailing space. |
| 1411 |
|
| 1412 |
Not rendered`monospaced` as there is a space missing. |
| 1413 |
|
| 1414 |
Not rendered `monospaced`as there is a space missing. |
| 1415 |
|
| 1416 |
|
| 1417 |
<span style="color:#bf0303;font-weight:bold">=== Escaped</span> |
| 1418 |
|
| 1419 |
Not \`monospaced` as it is escaped. |
| 1420 |
|
| 1421 |
Still \`<span style="color:#607880">`monospaced`</span>` as only the outermost level is escaped. |
| 1422 |
|
| 1423 |
|
| 1424 |
<span style="color:#bf0303;font-weight:bold">== Passthrough</span> |
| 1425 |
|
| 1426 |
<span style="color:#bf0303;font-weight:bold">=== Rendered passed through</span> |
| 1427 |
|
| 1428 |
This text is <span style="color:#ff5500">+passed _as_ is+</span> with no further formatting. |
| 1429 |
|
| 1430 |
Matching <span style="color:#ff5500">+is _lazy_+</span>, so this + is rendered. |
| 1431 |
|
| 1432 |
This <span style="color:#ff5500">+_is_ passthrough`+</span>` as passthrough has higher priority as monospaced. |
| 1433 |
|
| 1434 |
<span style="color:#ff5500">+passthrough+</span> at line start. |
| 1435 |
|
| 1436 |
Passthrough at <span style="color:#ff5500">+line end.+</span> |
| 1437 |
|
| 1438 |
Minimal passthrough <span style="color:#ff5500">+a+</span>. |
| 1439 |
|
| 1440 |
|
| 1441 |
This text is <span style="color:#ff5500">++passed _as_ is++</span> with no further formatting. |
| 1442 |
|
| 1443 |
This text is <span style="color:#ff5500">+++passed _as_ is+++</span> with no further formatting. |
| 1444 |
|
| 1445 |
|
| 1446 |
<span style="color:#bf0303;font-weight:bold">=== Rendered as-is</span> |
| 1447 |
|
| 1448 |
No+passthrough+ as there is no space before the leading <span style="color:#607880">`+`</span>. |
| 1449 |
|
| 1450 |
No +passthrough+as there is no space after the trailing plus. |
| 1451 |
|
| 1452 |
No + passthrough+ as there is a space after the leading <span style="color:#607880">`+`</span>. |
| 1453 |
|
| 1454 |
No +passthrough + as there is a space after the trailing plus. |
| 1455 |
|
| 1456 |
|
| 1457 |
<span style="color:#bf0303;font-weight:bold">=== Escaped</span> |
| 1458 |
|
| 1459 |
This text \+is <span style="font-style:italic">_not_</span> passed through+ because of escaping. |
| 1460 |
|
| 1461 |
This text \+<span style="color:#ff5500">+is _still_ passed through+</span>+ as only the outermost level is escaped. |
| 1462 |
|
| 1463 |
This text \+<span style="color:#ff5500">++is _still_ passed through++</span>+ as only the outermost level is escaped. |
| 1464 |
|
| 1465 |
|
| 1466 |
<span style="color:#bf0303;font-weight:bold">== Strong</span> |
| 1467 |
|
| 1468 |
<span style="color:#bf0303;font-weight:bold">=== Rendered formatted</span> |
| 1469 |
|
| 1470 |
This line contains a <span style="font-weight:bold">*sequence of * multiple strong*</span> words. |
| 1471 |
|
| 1472 |
This line contains a single <span style="font-weight:bold">**strong*</span> word. |
| 1473 |
|
| 1474 |
This line contains a single*<span style="font-weight:bold">*strong*</span> word. |
| 1475 |
|
| 1476 |
This line contains a single <span style="font-weight:bold">*strong*</span>* word. |
| 1477 |
|
| 1478 |
The text within the brackets should be (<span style="font-weight:bold">*strong*</span>), but the brackets themselves not. |
| 1479 |
|
| 1480 |
(<span style="font-weight:bold">*strong*</span> [<span style="font-weight:bold">*strong*</span> {<span style="font-weight:bold">*strong*</span> |<span style="font-weight:bold">*strong*</span> .<span style="font-weight:bold">*strong*</span> ,<span style="font-weight:bold">*strong*</span> !<span style="font-weight:bold">*strong*</span> ?<span style="font-weight:bold">*strong*</span> |
| 1481 |
|
| 1482 |
<span style="font-weight:bold">*strong*</span>) <span style="font-weight:bold">*strong*</span>] <span style="font-weight:bold">*strong*</span>} <span style="font-weight:bold">*strong*</span>| <span style="font-weight:bold">*strong*</span>. <span style="font-weight:bold">*strong*</span>; <span style="font-weight:bold">*strong*</span>, <span style="font-weight:bold">*strong*</span>? |
| 1483 |
|
| 1484 |
<span style="font-weight:bold">*strong*</span>( <span style="font-weight:bold">*strong*</span>( <span style="font-weight:bold">*strong*</span>[ <span style="font-weight:bold">*strong*</span>{ |
| 1485 |
|
| 1486 |
<span style="font-weight:bold">*strong*</span>) |
| 1487 |
|
| 1488 |
<span style="font-weight:bold">*strong*</span> |
| 1489 |
|
| 1490 |
aa<span style="font-weight:bold">**bb**</span> |
| 1491 |
|
| 1492 |
<span style="font-weight:bold">**aa**</span>bb |
| 1493 |
|
| 1494 |
aa<span style="font-weight:bold">**bb**</span>cc |
| 1495 |
|
| 1496 |
aa<span style="font-weight:bold">**bb *cc**</span>dd |
| 1497 |
|
| 1498 |
aa<span style="font-weight:bold">**bb cc**</span>*dd |
| 1499 |
|
| 1500 |
aa<span style="font-weight:bold">** bb **</span>cc |
| 1501 |
|
| 1502 |
|
| 1503 |
<span style="color:#bf0303;font-weight:bold">=== Rendered as-is</span> |
| 1504 |
|
| 1505 |
This line does <span style="font-style:italic">_not_</span> contain *some strong * text as there is a space before the trailing asterisk. |
| 1506 |
|
| 1507 |
This line does <span style="font-style:italic">_not_</span> contain*some strong* text as there is a space missing before the leading asterisk. |
| 1508 |
|
| 1509 |
This line does <span style="font-style:italic">_not_</span> contain *some strong*text as there is a space missing after the trailing asterisk. |
| 1510 |
|
| 1511 |
some text ;*strong* :*strong* _*strong* }*strong* |
| 1512 |
|
| 1513 |
some text <span style="font-style:italic">_*strong*_</span> |
| 1514 |
|
| 1515 |
;*strong* |
| 1516 |
:*strong* |
| 1517 |
}*strong* |
| 1518 |
|
| 1519 |
<span style="color:#607880"> Not *strong* as there is a leading space in the line, making it verbatim.</span> |
| 1520 |
|
| 1521 |
<span style="color:#898887">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#898887"> Highlighting differs.</span> |
| 1522 |
In this line, there is some <span style="font-weight:bold">***very strong*</span>** text. |
| 1523 |
It is rendered just ignoring the asterisks. |
| 1524 |
That is a bit strange. |
| 1525 |
|
| 1526 |
|
| 1527 |
<span style="color:#bf0303;font-weight:bold">=== Escaped</span> |
| 1528 |
|
| 1529 |
Not \*strong* as it is escaped. |
| 1530 |
|
| 1531 |
Still \*<span style="font-weight:bold">*strong*</span>* as only the outermost level is escaped. |
| 1532 |
|
| 1533 |
|
| 1534 |
<span style="color:#bf0303;font-weight:bold">== Subscript</span> |
| 1535 |
|
| 1536 |
<span style="color:#bf0303;font-weight:bold">=== Rendered formatted</span> |
| 1537 |
|
| 1538 |
H<span style="text-decoration:underline">~2~</span>O |
| 1539 |
|
| 1540 |
|
| 1541 |
<span style="color:#bf0303;font-weight:bold">=== Rendered as-is</span> |
| 1542 |
|
| 1543 |
Not rendered sub~sc ript~ as there is a space within. |
| 1544 |
|
| 1545 |
|
| 1546 |
<span style="color:#bf0303;font-weight:bold">=== Escaped</span> |
| 1547 |
|
| 1548 |
Not \~subscript~ as it is escaped. |
| 1549 |
|
| 1550 |
|
| 1551 |
<span style="color:#bf0303;font-weight:bold">== Superscript</span> |
| 1552 |
|
| 1553 |
<span style="color:#bf0303;font-weight:bold">=== Rendered formatted</span> |
| 1554 |
|
| 1555 |
E = m c<span style="font-weight:bold;text-decoration:underline">^2^</span> |
| 1556 |
|
| 1557 |
|
| 1558 |
<span style="color:#bf0303;font-weight:bold">=== Rendered as-is</span> |
| 1559 |
|
| 1560 |
Not rendered super^sc ript^ as there is a space within. |
| 1561 |
|
| 1562 |
|
| 1563 |
<span style="color:#bf0303;font-weight:bold">=== Escaped</span> |
| 1564 |
|
| 1565 |
Not \^superscript^ as it is escaped. |
| 1566 |
|
| 1567 |
|
| 1568 |
<span style="color:#bf0303;font-weight:bold">== Combinations</span> |
| 1569 |
|
| 1570 |
<span style="color:#006e28">IMPORTANT:</span> Combinations are supported by Asciidoctor, as long as the markup sets are entered in the right order. |
| 1571 |
The monospace markup must be the outermost set, then the strong set, and the emphasized markup must always be the innermost set. |
| 1572 |
|
| 1573 |
|
| 1574 |
<span style="color:#bf0303;font-weight:bold">=== Rendered formatted</span> |
| 1575 |
|
| 1576 |
This is <span style="font-weight:bold;font-style:italic">*_strong emphasized_*</span> text. |
| 1577 |
|
| 1578 |
This is <span style="font-weight:bold;font-style:italic">*__strong _ * emphasized_*</span> text. |
| 1579 |
|
| 1580 |
This is<span style="font-weight:bold;font-style:italic">**_strong emphasized_**</span>text. |
| 1581 |
|
| 1582 |
This is<span style="font-weight:bold;font-style:italic">**__ strong emphasized_**</span>text. |
| 1583 |
|
| 1584 |
<span style="font-weight:bold;font-style:italic">*_strong emphasized_*</span> |
| 1585 |
|
| 1586 |
|
| 1587 |
This is <span style="color:#607880;font-weight:bold">`*strong monospaced*`</span> text. |
| 1588 |
|
| 1589 |
This is <span style="color:#607880;font-weight:bold">`**strong ` * monospaced*`</span> text. |
| 1590 |
|
| 1591 |
This is<span style="color:#607880;font-weight:bold">``*strong monospaced*``</span>text. |
| 1592 |
|
| 1593 |
This is<span style="color:#607880;font-weight:bold">``** strong monospaced*``</span>text. |
| 1594 |
|
| 1595 |
<span style="color:#607880;font-weight:bold">`*strong monospaced*`</span> |
| 1596 |
|
| 1597 |
|
| 1598 |
This is <span style="color:#607880;font-style:italic">`_emphasized monospaced_`</span> text. |
| 1599 |
|
| 1600 |
This is <span style="color:#607880;font-style:italic">`__emphasized ` _ monospaced_`</span> text. |
| 1601 |
|
| 1602 |
This is<span style="color:#607880;font-style:italic">``_emphasized monospaced_``</span>text. |
| 1603 |
|
| 1604 |
This is<span style="color:#607880;font-style:italic">``__ emphasized monospaced_``</span>text. |
| 1605 |
|
| 1606 |
<span style="color:#607880;font-style:italic">`_emphasized monospaced_`</span> |
| 1607 |
|
| 1608 |
|
| 1609 |
This is <span style="color:#607880;font-weight:bold;font-style:italic">`*_strong emphasized monospaced_*`</span> text. |
| 1610 |
|
| 1611 |
This is <span style="color:#607880;font-weight:bold;font-style:italic">`*__strong emphasized * ` _ monospaced_*`</span> text. |
| 1612 |
|
| 1613 |
This is<span style="color:#607880;font-weight:bold;font-style:italic">``*_strong emphasized monospaced_*``</span>text. |
| 1614 |
|
| 1615 |
This is<span style="color:#607880;font-weight:bold;font-style:italic">``*__ strong emphasized monospaced_*``</span>text. |
| 1616 |
|
| 1617 |
<span style="color:#607880;font-weight:bold;font-style:italic">`*_strong emphasized monospaced_*`</span> |
| 1618 |
|
| 1619 |
|
| 1620 |
<span style="color:#bf0303;font-weight:bold">=== Unsupported</span> |
| 1621 |
|
| 1622 |
Highlighting for other combinations is currently not supported, as there would be a large number of rules and styles necessary. |
| 1623 |
|
| 1624 |
<span style="font-weight:bold">*</span> <span style="font-style:italic">_emphasized #marked#_</span> |
| 1625 |
<span style="font-weight:bold">*</span> <span style="color:#b08000">#marked *strong*#</span> |
| 1626 |
<span style="font-weight:bold">*</span> <span style="font-weight:bold">*strong #marked#*</span> |
| 1627 |
<span style="font-weight:bold">*</span> <span style="font-weight:bold">*strong _emphasized #marked#_*</span> |
| 1628 |
|
| 1629 |
<span style="font-weight:bold">*</span> subscript <span style="font-style:italic">_with~in~ emphasized_</span> |
| 1630 |
<span style="font-weight:bold">*</span> subscript within marked: <span style="color:#b08000">#H~2~O#</span> |
| 1631 |
<span style="font-weight:bold">*</span> subscript <span style="color:#607880">`with~in~ monospaced`</span> |
| 1632 |
<span style="font-weight:bold">*</span> subscript <span style="font-weight:bold">*with~in~ strong*</span> |
| 1633 |
|
| 1634 |
<span style="font-weight:bold">*</span> superscript <span style="font-style:italic">_with^in^ emphasized_</span> |
| 1635 |
<span style="font-weight:bold">*</span> superscript within marked: <span style="color:#b08000">#E = m c^2^#</span> |
| 1636 |
<span style="font-weight:bold">*</span> superscript <span style="color:#607880">`with^in^ monospaced`</span> |
| 1637 |
<span style="font-weight:bold">*</span> superscript <span style="font-weight:bold">*with^in^ strong*</span> |
| 1638 |
|
| 1639 |
And even more complex ones. |
| 1640 |
|
| 1641 |
|
| 1642 |
<span style="color:#bf0303;font-weight:bold">=== Rendered as-is</span> |
| 1643 |
|
| 1644 |
This is no <span style="font-weight:bold">*_ strong emphasized_*</span> text, it<span style="font-weight:bold;text-decoration:underline">'</span>s <span style="font-weight:bold">*strong*</span> only. |
| 1645 |
|
| 1646 |
This is no <span style="font-weight:bold">*_strong emphasized _*</span> text, it<span style="font-weight:bold;text-decoration:underline">'</span>s <span style="font-weight:bold">*strong*</span> only. |
| 1647 |
|
| 1648 |
This is no <span style="font-style:italic">_*strong emphasized*_</span> text, it<span style="font-weight:bold;text-decoration:underline">'</span>s <span style="font-style:italic">_emphasized_</span> only. |
| 1649 |
|
| 1650 |
This is no <span style="font-style:italic">_`emphasized monospaced`_</span> text, it<span style="font-weight:bold;text-decoration:underline">'</span>s <span style="font-style:italic">_emphasized_</span> only. |
| 1651 |
|
| 1652 |
|
| 1653 |
<span style="color:#bf0303;font-weight:bold">=== Escaped</span> |
| 1654 |
|
| 1655 |
This is not rendered \`<span style="font-style:italic">_emphasized monospaced_</span>`. <span style="font-weight:bold;text-decoration:underline">+</span> |
| 1656 |
But it is rendered emphasized. |
| 1657 |
|
| 1658 |
This is not rendered \*<span style="font-style:italic">_emphasized strong_</span>*. <span style="font-weight:bold;text-decoration:underline">+</span> |
| 1659 |
But it is rendered emphasized. |
| 1660 |
|
| 1661 |
This is not rendered \`<span style="font-weight:bold">*monospaced strong*</span>`. <span style="font-weight:bold;text-decoration:underline">+</span> |
| 1662 |
But it is rendered strong. |
| 1663 |
|
| 1664 |
This is not rendered \`<span style="font-weight:bold;font-style:italic">*_emphasized monospaced strong_*</span>`. <span style="font-weight:bold;text-decoration:underline">+</span> |
| 1665 |
But it is rendered emphasized strong. |
| 1666 |
|
| 1667 |
|
| 1668 |
<span style="color:#bf0303;font-weight:bold">= Horizontal Rules</span> |
| 1669 |
|
| 1670 |
<span style="color:#bf0303;font-weight:bold">== Simple patterns</span> |
| 1671 |
|
| 1672 |
<span style="font-weight:bold;text-decoration:underline">'''</span> |
| 1673 |
<span style="font-weight:bold;text-decoration:underline">---</span> |
| 1674 |
<span style="font-weight:bold;text-decoration:underline">***</span> |
| 1675 |
|
| 1676 |
|
| 1677 |
<span style="color:#bf0303;font-weight:bold">== Patterns with spaces</span> |
| 1678 |
|
| 1679 |
<span style="font-weight:bold;text-decoration:underline">- - -</span> |
| 1680 |
<span style="font-weight:bold;text-decoration:underline">* * *</span> |
| 1681 |
|
| 1682 |
<span style="color:#bf0303;font-style:italic">.Not a horizontal rule</span> |
| 1683 |
' ' ' |
| 1684 |
|
| 1685 |
|
| 1686 |
<span style="color:#bf0303;font-weight:bold">== Arbitrary length</span> |
| 1687 |
|
| 1688 |
<span style="color:#006e28">NOTE:</span> Although the <span style="color:#0057ae;text-decoration:underline">https://asciidoctor.org/docs/user-manual/#markdown-style-horizontal-rules[Asciidoctor Manual]</span> states that horizontal rule patterns are only supporting up to three characters (ignoring the optional spaces), some longer patterns work too. |
| 1689 |
|
| 1690 |
''''''' |
| 1691 |
|
| 1692 |
<span style="color:#898887">////</span> |
| 1693 |
<span style="color:#898887">These patterns don't work, as they start delimited blocks, item lists etc..</span> |
| 1694 |
<span style="color:#898887">--------</span> |
| 1695 |
<span style="color:#898887">******</span> |
| 1696 |
<span style="color:#898887">- - - - - -</span> |
| 1697 |
<span style="color:#898887">* * * * * * * * * </span> |
| 1698 |
<span style="color:#898887">////</span> |
| 1699 |
|
| 1700 |
|
| 1701 |
<span style="color:#bf0303;font-weight:bold">== Inside blocks</span> |
| 1702 |
|
| 1703 |
<span style="color:#006e28;font-weight:bold">****</span> |
| 1704 |
Horizontal rules work also inside blocks. |
| 1705 |
They eventually need an empty line before them, though. |
| 1706 |
|
| 1707 |
<span style="font-weight:bold;text-decoration:underline">'''</span> |
| 1708 |
After the horizontal rule. |
| 1709 |
<span style="color:#006e28;font-weight:bold">****</span> |
| 1710 |
|
| 1711 |
|
| 1712 |
<span style="color:#bf0303;font-weight:bold">= Include</span> |
| 1713 |
<span style="color:#0057ae">:includedir: </span><span style="color:#0057ae;font-style:italic">include</span> |
| 1714 |
|
| 1715 |
<span style="color:#bf0303;font-weight:bold">== Included Contents Rendered</span> |
| 1716 |
|
| 1717 |
<span style="color:#006e28">IMPORTANT:</span> The include directive is <span style="font-style:italic">_always_</span> processed, even within passthrough blocks. |
| 1718 |
|
| 1719 |
<span style="color:#006e28">NOTE:</span> Using file names with spaces works. |
| 1720 |
|
| 1721 |
<span style="color:#006e28">include::{includedir}/demo.adoc[]</span> |
| 1722 |
|
| 1723 |
<span style="color:#bf0303;font-style:italic">.Partial include</span> |
| 1724 |
<span style="color:#006e28">include::{includedir}/demo.adoc[lines=2..3]</span> |
| 1725 |
|
| 1726 |
<span style="color:#bf0303;font-style:italic">.Inside contiguous block</span> |
| 1727 |
<span style="color:#006e28">[literal]</span> |
| 1728 |
<span style="color:#607880">This line shall be highlighted as verbatim.</span> |
| 1729 |
<span style="color:#006e28">include::{includedir}/demo.adoc[lines=2..3]</span> |
| 1730 |
<span style="color:#607880">This line shall be highlighted as verbatim.</span> |
| 1731 |
|
| 1732 |
<span style="color:#bf0303;font-style:italic">.Inside delimited block with name</span> |
| 1733 |
<span style="color:#006e28">[literal]</span> |
| 1734 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 1735 |
<span style="color:#607880">This line shall be highlighted as verbatim.</span> |
| 1736 |
<span style="color:#006e28">include::{includedir}/demo.adoc[lines=2..3]</span> |
| 1737 |
<span style="color:#607880">This line shall be highlighted as verbatim.</span> |
| 1738 |
<span style="color:#006e28;font-weight:bold">----</span> |
| 1739 |
|
| 1740 |
<span style="color:#bf0303;font-style:italic">.Inside delimited block without name</span> |
| 1741 |
<span style="color:#006e28;font-weight:bold">....</span> |
| 1742 |
<span style="color:#607880">This line shall be highlighted as verbatim.</span> |
| 1743 |
<span style="color:#006e28">include::{includedir}/demo.adoc[lines=2..3]</span> |
| 1744 |
<span style="color:#607880">This line shall be highlighted as verbatim.</span> |
| 1745 |
<span style="color:#006e28;font-weight:bold">....</span> |
| 1746 |
|
| 1747 |
<span style="color:#bf0303;font-style:italic">.It is also processed within passthrough blocks</span> |
| 1748 |
<span style="color:#006e28">[pass]</span> |
| 1749 |
<span style="color:#ff5500">This line shall be highlighted as passthrough.</span> |
| 1750 |
<span style="color:#006e28">include::{includedir}/demo.adoc[lines=2..3]</span> |
| 1751 |
<span style="color:#ff5500">This line shall be highlighted as passthrough.</span> |
| 1752 |
|
| 1753 |
<span style="color:#006e28">[pass]</span> |
| 1754 |
<span style="color:#ff5500">--</span> |
| 1755 |
<span style="color:#ff5500">This line shall be highlighted as passthrough.</span> |
| 1756 |
<span style="color:#006e28">include::{includedir}/demo.adoc[lines=2..3]</span> |
| 1757 |
<span style="color:#ff5500">This line shall be highlighted as passthrough.</span> |
| 1758 |
<span style="color:#ff5500">--</span> |
| 1759 |
|
| 1760 |
<span style="color:#bf0303;font-style:italic">.Inside table</span> |
| 1761 |
<span style="color:#006e28;font-weight:bold">|===</span> |
| 1762 |
<span style="color:#006e28;font-weight:bold">|</span>row 1 col 1<span style="color:#006e28;font-weight:bold">|</span>row 2 col 2 |
| 1763 |
<span style="color:#006e28;font-weight:bold">|</span> |
| 1764 |
<span style="color:#898887">// the include directive must have its own line with nothing else</span> |
| 1765 |
<span style="color:#006e28">include::{includedir}/demo.adoc[lines=1..1]</span> |
| 1766 |
<span style="color:#006e28;font-weight:bold">|</span>row 2 col2 |
| 1767 |
|
| 1768 |
<span style="color:#006e28;font-weight:bold">|</span>row 3 col 1 |
| 1769 |
<span style="color:#006e28;font-weight:bold">|</span>row 3 col 2 |
| 1770 |
<span style="color:#006e28;font-weight:bold">|===</span> |
| 1771 |
|
| 1772 |
|
| 1773 |
<span style="color:#bf0303;font-weight:bold">= Index</span> |
| 1774 |
|
| 1775 |
<span style="color:#bf0303;font-weight:bold">== Rendered as Index Term</span> |
| 1776 |
|
| 1777 |
This is a <span style="color:#006e28">((flow))</span> index term. |
| 1778 |
|
| 1779 |
This is a <span style="color:#006e28">indexterm2:[flow]</span> index term. |
| 1780 |
|
| 1781 |
This is a <span style="color:#006e28">(((concealed, index, term)))</span> concealed index term. |
| 1782 |
|
| 1783 |
This is a <span style="color:#006e28">indexterm:[concealed, index, term]</span> concealed index term. |
| 1784 |
|
| 1785 |
This is rendered as a <span style="color:#006e28">((flow index term))</span>). |
| 1786 |
|
| 1787 |
This is rendered as a <span style="color:#006e28">(((flow index term))</span>. |
| 1788 |
|
| 1789 |
This is <span style="color:#006e28">((())</span>) empty but rendered as index term nevertheless. |
| 1790 |
|
| 1791 |
Some <span style="color:#006e28">(((index term)))</span>. |
| 1792 |
|
| 1793 |
Some <span style="color:#006e28">((((index term)))</span>). |
| 1794 |
|
| 1795 |
|
| 1796 |
<span style="color:#bf0303;font-weight:bold">== Rendered as-is</span> |
| 1797 |
|
| 1798 |
This is (()) not an index term as it is empty. |
| 1799 |
|
| 1800 |
This is (not an index term)) as there is a <span style="color:#607880">`(`</span> missing. |
| 1801 |
|
| 1802 |
This is ((not an index term) as there is a <span style="color:#607880">`)`</span> missing. |
| 1803 |
|
| 1804 |
|
| 1805 |
<span style="color:#bf0303;font-weight:bold">== Escaped</span> |
| 1806 |
|
| 1807 |
This is \((not an indexterm)) as it is escaped. |
| 1808 |
|
| 1809 |
This is \(<span style="color:#006e28">((not a concealed index term))</span>), but still a flow index term as only the outer brackets are escaped. |
| 1810 |
|
| 1811 |
This is \(\((not an indexterm))) as it is fully escaped. |
| 1812 |
|
| 1813 |
This is not a \indexterm2:[flow] index term. |
| 1814 |
|
| 1815 |
This is not a \indexterm:[concealed, index, term] concealed index term. |
| 1816 |
|
| 1817 |
|
| 1818 |
<span style="color:#006e28">[index]</span> |
| 1819 |
<span style="color:#bf0303;font-weight:bold">== Index Catalog</span> |
| 1820 |
|
| 1821 |
<span style="color:#006e28">WARNING:</span> HTML output currently does not support the creation of the index catalog. |
| 1822 |
|
| 1823 |
|
| 1824 |
<span style="color:#bf0303;font-weight:bold">= Link</span> |
| 1825 |
|
| 1826 |
<span style="color:#bf0303;font-weight:bold">== ftp, irc</span> |
| 1827 |
|
| 1828 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">ftp://some.org/some/where/file.extension</span> |
| 1829 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">irc://some.org/some/where/file.extension</span> |
| 1830 |
|
| 1831 |
|
| 1832 |
<span style="color:#bf0303;font-weight:bold">== http(s)</span> |
| 1833 |
|
| 1834 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">http://some.org/some/where/file.extension</span> |
| 1835 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension</span> |
| 1836 |
|
| 1837 |
<span style="color:#898887">// . , ; : followed by a space terminate the link</span> |
| 1838 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension</span>. some text |
| 1839 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension.some</span> text |
| 1840 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension</span>, some text |
| 1841 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension,some</span> text |
| 1842 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension</span>; some text |
| 1843 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension;some</span> text |
| 1844 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension</span>: some text |
| 1845 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension</span> some text |
| 1846 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension:some</span> text |
| 1847 |
|
| 1848 |
<span style="color:#898887">// unbalanced square brackets always terminate the link</span> |
| 1849 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension</span>[some text |
| 1850 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension</span>[ some text |
| 1851 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension</span>]some text |
| 1852 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension</span>] some text |
| 1853 |
|
| 1854 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension[]</span> |
| 1855 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension[some text]</span>trailing text |
| 1856 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension[some text]</span>. trailing text |
| 1857 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension[some text]</span>, trailing text |
| 1858 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension[some text]</span>; trailing text |
| 1859 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension[some text]</span>: trailing text |
| 1860 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension[some]</span>text] trailing text |
| 1861 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension[some ]</span>text] trailing text |
| 1862 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension[some \]text]</span> - with escaped <span style="color:#607880">`]`</span> |
| 1863 |
|
| 1864 |
<span style="color:#898887">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#898887">: highlighting of text within [] ?</span> |
| 1865 |
<span style="font-weight:bold">*</span> some text <span style="color:#0057ae;text-decoration:underline">https://some.org/some/where/file.extension[*some text*]</span> trailing text. |
| 1866 |
|
| 1867 |
<span style="color:#898887">// some characters may be placed before the `http`</span> |
| 1868 |
<span style="font-weight:bold">*</span> (<span style="color:#0057ae;text-decoration:underline">https://some.org</span> |
| 1869 |
<span style="font-weight:bold">*</span> )<span style="color:#0057ae;text-decoration:underline">https://some.org</span> |
| 1870 |
<span style="font-weight:bold">*</span> [<span style="color:#0057ae;text-decoration:underline">https://some.org</span> |
| 1871 |
<span style="font-weight:bold">*</span> ]<span style="color:#0057ae;text-decoration:underline">https://some.org</span> |
| 1872 |
<span style="font-weight:bold">*</span> ;<span style="color:#0057ae;text-decoration:underline">https://some.org</span> |
| 1873 |
<span style="font-weight:bold">*</span> <<span style="color:#0057ae;text-decoration:underline">https://some.org</span> |
| 1874 |
<span style="font-weight:bold">*</span> ><span style="color:#0057ae;text-decoration:underline">https://some.org</span> |
| 1875 |
|
| 1876 |
|
| 1877 |
<span style="color:#bf0303;font-weight:bold">=== Not rendered as Link</span> |
| 1878 |
|
| 1879 |
<span style="font-weight:bold">*</span> {https://some.org |
| 1880 |
<span style="font-weight:bold">*</span> }https://some.org |
| 1881 |
<span style="font-weight:bold">*</span> ,https://some.org |
| 1882 |
<span style="font-weight:bold">*</span> .https://some.org |
| 1883 |
<span style="font-weight:bold">*</span> :https://some.org |
| 1884 |
|
| 1885 |
|
| 1886 |
<span style="color:#bf0303;font-weight:bold">== link</span> |
| 1887 |
|
| 1888 |
<span style="font-weight:bold">*</span> link:relative/path - not rendered as link as <span style="color:#607880">`[]`</span> are misssing |
| 1889 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">link:relative/path[]</span> |
| 1890 |
<span style="font-weight:bold">*</span> <span style="color:#b08000">##before##</span><span style="color:#0057ae;text-decoration:underline">link:relative/path[]</span><span style="color:#b08000">##after##</span> - no spaces needed |
| 1891 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">link:relative/path/file.extension[local file]</span> |
| 1892 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">link:relative/path/file.extension[local ]</span>file] |
| 1893 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">link:relative/path/file.extension[local \]file]</span> - with escaped <span style="color:#607880">`]`</span> |
| 1894 |
<span style="font-weight:bold">*</span> link:relative/path with spaces/[] - not rendered as link because of spaces |
| 1895 |
<span style="font-weight:bold">*</span> link:<span style="color:#ff5500">++relative/path with spaces/++</span>[] - but this is rendered as link with spaces |
| 1896 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">link:external.html#anchor[to anchor of local HTML file]</span> |
| 1897 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">link:url[optional link text, optional target attribute, optional role attribute]</span> |
| 1898 |
|
| 1899 |
|
| 1900 |
<span style="color:#bf0303;font-weight:bold">== E-Mail</span> |
| 1901 |
|
| 1902 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">[email protected]</span> |
| 1903 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">[email protected]</span>[some one] - brackets supported only with leading <span style="color:#607880">`mailto:`</span> |
| 1904 |
<span style="font-weight:bold">*</span> :[email protected] - not rendered as link because of leading <span style="color:#607880">`:`</span> |
| 1905 |
<span style="font-weight:bold">*</span> /[email protected] - not rendered as link because of leading <span style="color:#607880">`/`</span> |
| 1906 |
|
| 1907 |
<span style="font-weight:bold">*</span> mailto:[email protected] - not rendered as link as <span style="color:#607880">`[]`</span> are misssing |
| 1908 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">mailto:[email protected][]</span> |
| 1909 |
<span style="font-weight:bold">*</span> <span style="color:#b08000">##before##</span><span style="color:#0057ae;text-decoration:underline">mailto:[email protected][]</span><span style="color:#b08000">##after##</span> - no spaces needed |
| 1910 |
<span style="font-weight:bold">*</span> <span style="color:#0057ae;text-decoration:underline">mailto:[email protected][some one]</span> |
| 1911 |
<span style="font-weight:bold">*</span> mailto::[email protected][] - not rendered as link because of double <span style="color:#607880">`:`</span> |
| 1912 |
<span style="font-weight:bold">*</span> mailto: <span style="color:#0057ae;text-decoration:underline">[email protected]</span>[] - not rendered as mailto because of space after <span style="color:#607880">`:`</span>, but still as inline email |
| 1913 |
<span style="font-weight:bold">*</span> mailto:[some one] - not rendered as link because of missing address |
| 1914 |
|
| 1915 |
|
| 1916 |
<span style="color:#bf0303;font-weight:bold">== Escaped</span> |
| 1917 |
|
| 1918 |
<span style="font-weight:bold">*</span> \ftp://some.org/some/where/file.extension |
| 1919 |
<span style="font-weight:bold">*</span> \irc://some.org/some/where/file.extension |
| 1920 |
<span style="font-weight:bold">*</span> \https://some.org/some/where/file.extension |
| 1921 |
<span style="font-weight:bold">*</span> \link:relative/path[] |
| 1922 |
<span style="font-weight:bold">*</span> \link:relative/path[] |
| 1923 |
<span style="font-weight:bold">*</span> \[email protected] |
| 1924 |
<span style="font-weight:bold">*</span> \:[email protected] |
| 1925 |
<span style="font-weight:bold">*</span> \/[email protected] |
| 1926 |
<span style="font-weight:bold">*</span> \mailto:[email protected][] |
| 1927 |
|
| 1928 |
|
| 1929 |
<span style="color:#bf0303;font-weight:bold">= List</span> |
| 1930 |
|
| 1931 |
<span style="color:#bf0303;font-weight:bold">== Bulleted List</span> |
| 1932 |
|
| 1933 |
<span style="color:#898887">////</span> |
| 1934 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#898887"> The *** without text in the list below should not be highlighted as a horizontal line.</span> |
| 1935 |
<span style="color:#898887">This is going to be problematic, as we would need to know that we are currently inside a list.</span> |
| 1936 |
<span style="color:#898887">////</span> |
| 1937 |
<span style="color:#bf0303;font-style:italic">.using asterisks</span> |
| 1938 |
<span style="font-weight:bold">*</span> item 1 |
| 1939 |
<span style="font-weight:bold"> *</span> * item 2 |
| 1940 |
Has some text. |
| 1941 |
<span style="font-weight:bold">**</span> item 2.1 |
| 1942 |
Also has some text. |
| 1943 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 1944 |
And an additional paragraph. |
| 1945 |
<span style="font-weight:bold">**</span> item 2.2 |
| 1946 |
<span style="font-weight:bold">***</span> item 2.2.1 |
| 1947 |
<span style="font-weight:bold;text-decoration:underline">+</span> |
| 1948 |
Markers without a text are <span style="font-style:italic">_no_</span> item. |
| 1949 |
<span style="font-weight:bold;text-decoration:underline">***</span> |
| 1950 |
<span style="font-weight:bold">**</span> item 2.3 |
| 1951 |
<span style="font-weight:bold">***</span> item 2.3.1 |
| 1952 |
<span style="font-weight:bold">****</span> item 2.3.1.1 |
| 1953 |
<span style="font-weight:bold">*</span> item 3 |
| 1954 |
|
| 1955 |
<span style="font-weight:bold"> *</span> item 4 |
| 1956 |
<span style="font-weight:bold">**</span> item 4.1 |
| 1957 |
**not an item as there is no space |
| 1958 |
<span style="font-weight:bold"> **</span> item 4.2 |
| 1959 |
|
| 1960 |
<span style="color:#bf0303;font-style:italic">.using hyphens</span> |
| 1961 |
<span style="font-weight:bold">-</span> item 1 |
| 1962 |
<span style="font-weight:bold"> -</span> item 2 |
| 1963 |
<span style="font-weight:bold;text-decoration:underline">--</span> item 2.1 is not an item as using hyphens is only supported for flat lists |
| 1964 |
|
| 1965 |
<span style="color:#bf0303;font-style:italic">.inside a block</span> |
| 1966 |
<span style="color:#006e28;font-weight:bold">****</span> |
| 1967 |
<span style="font-weight:bold">*</span> item 1 |
| 1968 |
<span style="font-weight:bold">**</span> item 1.1 |
| 1969 |
<span style="color:#006e28;font-weight:bold">****</span> |
| 1970 |
|
| 1971 |
|
| 1972 |
<span style="color:#bf0303;font-weight:bold">== Checklist</span> |
| 1973 |
|
| 1974 |
<span style="color:#bf0303;font-style:italic">.using asterisks</span> |
| 1975 |
<span style="font-weight:bold">* [*]</span> checked |
| 1976 |
<span style="font-weight:bold">** [x]</span> also checked |
| 1977 |
<span style="font-weight:bold">*** [x]</span> also checked |
| 1978 |
<span style="font-weight:bold">*</span> [X] <span style="font-style:italic">_invalid_</span> check (capital X), normal list item |
| 1979 |
<span style="font-weight:bold">*</span> [o] <span style="font-style:italic">_invalid_</span> check (invalid character), normal list item |
| 1980 |
<span style="font-weight:bold">*</span> [] <span style="font-style:italic">_invalid_</span> check (no space), normal list item |
| 1981 |
<span style="font-weight:bold">* [ ]</span> not checked |
| 1982 |
<span style="font-weight:bold">*</span> normal list item |
| 1983 |
|
| 1984 |
<span style="color:#bf0303;font-style:italic">.using hyphens</span> |
| 1985 |
<span style="font-weight:bold">- [*]</span> checked |
| 1986 |
<span style="font-weight:bold">- [*]</span> also checked |
| 1987 |
<span style="font-weight:bold;text-decoration:underline">--</span> [*] <span style="font-style:italic">_not a list item_</span> as hyphens are only supported for flat lists |
| 1988 |
<span style="font-weight:bold;text-decoration:underline">--</span> [*] <span style="font-style:italic">_not a list item_</span> as hyphens are only supported for flat lists |
| 1989 |
|
| 1990 |
|
| 1991 |
<span style="color:#bf0303;font-weight:bold">== Description List</span> |
| 1992 |
|
| 1993 |
<span style="color:#bf0303;font-style:italic">.Normal format</span> |
| 1994 |
<span style="font-weight:bold">Term normal::</span> This is a description. |
| 1995 |
<span style="font-weight:bold"> Term indented::</span> This works too. |
| 1996 |
|
| 1997 |
<span style="font-weight:bold">Term multi line::</span> |
| 1998 |
This one has multiple lines. |
| 1999 |
Two lines to be exact. |
| 2000 |
<span style="font-weight:bold">Term L2:::</span> This term is on level 2. |
| 2001 |
<span style="font-weight:bold">Term L3::::</span> This term is on level 3. |
| 2002 |
<span style="font-weight:bold">Term L4:::::</span> This term is on level 4. |
| 2003 |
<span style="font-weight:bold">Term L5::::::</span> This term is on level 5. |
| 2004 |
<span style="font-weight:bold">Term with empty definition::</span> |
| 2005 |
<span style="font-weight:bold">Term with separated colons ::</span> This one has spaces before the <span style="color:#607880">`::`</span>. |
| 2006 |
Term no space::This is <span style="font-style:italic">_not a description item_</span> as there is no space after the <span style="color:#607880">`::`</span>. |
| 2007 |
<span style="font-weight:bold">Term with unnumbered list::</span> |
| 2008 |
<span style="font-weight:bold">*</span> list item 1 |
| 2009 |
<span style="font-weight:bold">*</span> list item 2 |
| 2010 |
<span style="font-weight:bold">Term with multiple colons:: in the term::</span> |
| 2011 |
Having multiple <span style="color:#607880">`::`</span> in one line is OK too. |
| 2012 |
<span style="font-weight:bold">.;Strange Term = !?*::</span> This one has a strange term. |
| 2013 |
Term 9 : : A space between the double <span style="color:#607880">`:`</span> does <span style="font-style:italic">_not_</span> work. |
| 2014 |
|
| 2015 |
<span style="color:#bf0303;font-style:italic">.Term and description on the same line</span> |
| 2016 |
<span style="color:#006e28">[horizontal]</span> |
| 2017 |
<span style="font-weight:bold">Term 1::</span> first level. |
| 2018 |
<span style="font-weight:bold">Term 2:::</span> second level. |
| 2019 |
<span style="font-weight:bold">Term 3::</span> first level again. |
| 2020 |
|
| 2021 |
|
| 2022 |
<span style="color:#bf0303;font-weight:bold">== Numbered List</span> |
| 2023 |
|
| 2024 |
<span style="color:#bf0303;font-style:italic">.using numbers</span> |
| 2025 |
<span style="font-weight:bold">1.</span> item 1 |
| 2026 |
<span style="font-weight:bold">2.</span> item 2 |
| 2027 |
<span style="font-weight:bold"> 3.</span> item 3 |
| 2028 |
4 Is not an item. |
| 2029 |
Numbers without a trailing dot do <span style="font-style:italic">_not_</span> result in an item. |
| 2030 |
<span style="font-weight:bold">123.</span> This is an item with an out-of-sequence number. |
| 2031 |
It will be fixed in the rendered output. |
| 2032 |
|
| 2033 |
<span style="color:#bf0303;font-style:italic">.using dots</span> |
| 2034 |
<span style="font-weight:bold">.</span> item 1 |
| 2035 |
<span style="font-weight:bold"> .</span> item 2 |
| 2036 |
..not an item as there is no space |
| 2037 |
<span style="font-weight:bold"> ..</span> item 2.1 |
| 2038 |
<span style="font-weight:bold"> ..</span> item 2.2 |
| 2039 |
<span style="font-weight:bold">...</span> item 2.2.1 |
| 2040 |
<span style="font-weight:bold">....</span> item 2.2.1.1 |
| 2041 |
<span style="font-weight:bold"> .</span> item 3 |
| 2042 |
|
| 2043 |
|
| 2044 |
<span style="color:#bf0303;font-weight:bold">== Question and Answer List</span> |
| 2045 |
|
| 2046 |
<span style="color:#006e28">[qanda]</span> |
| 2047 |
<span style="font-weight:bold">What is Asciidoctor?::</span> |
| 2048 |
An implementation of the AsciiDoc processor in Ruby. |
| 2049 |
<span style="font-weight:bold">Must the answer be indented?::</span> |
| 2050 |
It<span style="font-weight:bold;text-decoration:underline">'</span>s not necessary, but possibly. |
| 2051 |
<span style="font-weight:bold">What is the answer to the Ultimate Question?::</span> 42 |
| 2052 |
|
| 2053 |
|
| 2054 |
<span style="color:#bf0303;font-weight:bold">= Macro</span> |
| 2055 |
<span style="color:#898887">// for `btn:`, `kbd:`, `menu:`</span> |
| 2056 |
<span style="color:#0057ae">:experimental:</span> |
| 2057 |
<span style="color:#898887">// for icon:tags[] etc.</span> |
| 2058 |
<span style="color:#0057ae">:imagesdir: </span><span style="color:#0057ae;font-style:italic">media</span> |
| 2059 |
<span style="color:#898887">// needed to use macro `toc::[]`</span> |
| 2060 |
<span style="color:#0057ae">:toc: </span><span style="color:#0057ae;font-style:italic">macro</span> |
| 2061 |
|
| 2062 |
<span style="color:#bf0303;font-weight:bold">== General Information</span> |
| 2063 |
|
| 2064 |
<span style="color:#006e28">NOTE:</span> There is no space needed before the macro name or after the closing <span style="color:#607880">`]`</span>. |
| 2065 |
|
| 2066 |
|
| 2067 |
<span style="color:#bf0303;font-weight:bold">== Anchor</span> |
| 2068 |
|
| 2069 |
There is a macro form <span style="color:#006e28">anchor:anchor-id[Macro Anchor]</span> for anchor definition. |
| 2070 |
|
| 2071 |
See <span style="color:#607880">`anchor.adoc`</span> for other forms. |
| 2072 |
|
| 2073 |
|
| 2074 |
<span style="color:#bf0303;font-weight:bold">== Cross Reference</span> |
| 2075 |
|
| 2076 |
<span style="color:#006e28">xref:anchor-id[macro xref]</span> |
| 2077 |
|
| 2078 |
<span style="color:#006e28">WARNING:</span> Highlighting for cross references with text spanning multiple lines is not supported. |
| 2079 |
|
| 2080 |
xref:id[ |
| 2081 |
Line 1 in cross reference text. |
| 2082 |
Line 2 in cross reference text. |
| 2083 |
] |
| 2084 |
|
| 2085 |
\xref:anchor-id[macro xref] escaped |
| 2086 |
|
| 2087 |
|
| 2088 |
<span style="color:#bf0303;font-weight:bold">== Footnote</span> |
| 2089 |
|
| 2090 |
This text has a foonote<span style="color:#006e28">footnote:[A simple footnote.]</span>. |
| 2091 |
|
| 2092 |
This text has a foonote with id<span style="color:#006e28">footnoteref:[fn-1, A footnote reference.]</span>. |
| 2093 |
|
| 2094 |
|
| 2095 |
<span style="color:#bf0303;font-weight:bold">== Icon</span> |
| 2096 |
|
| 2097 |
This is a tag <span style="color:#006e28">icon:tags[]</span> icon with no color set. |
| 2098 |
|
| 2099 |
This is a blue <span style="color:#006e28">icon:tags[role="blue"]</span> tag. |
| 2100 |
|
| 2101 |
This is a big green <span style="color:#006e28">icon:tags[role="green", size="2x"]</span> tag. |
| 2102 |
|
| 2103 |
|
| 2104 |
<span style="color:#bf0303;font-weight:bold">== Image</span> |
| 2105 |
|
| 2106 |
An image<span style="color:#006e28">image:logo-outline-color.svg[Logo,25]</span>within some text. |
| 2107 |
|
| 2108 |
|
| 2109 |
<span style="color:#bf0303;font-weight:bold">== Keyboard Shortcut</span> |
| 2110 |
|
| 2111 |
<span style="color:#006e28">kbd:[Ctrl+M]</span> |
| 2112 |
|
| 2113 |
|
| 2114 |
<span style="color:#bf0303;font-weight:bold">== Menu Selection</span> |
| 2115 |
|
| 2116 |
<span style="color:#006e28">menu:File[Save]</span> |
| 2117 |
|
| 2118 |
<span style="color:#006e28">menu:View[Zoom > 1:1]</span> |
| 2119 |
|
| 2120 |
|
| 2121 |
<span style="color:#bf0303;font-weight:bold">== Pass</span> |
| 2122 |
|
| 2123 |
<span style="color:#898887">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#898887"> Would be nice to highlight the text within the square brackets as passthrough.</span> |
| 2124 |
|
| 2125 |
Some <span style="color:#006e28">pass:[<u>passthrough</u>]</span> HTML. |
| 2126 |
|
| 2127 |
Some <span style="color:#006e28">pass:quotes[<u>passthrough with *quoted* text</u>]</span> HTML. |
| 2128 |
|
| 2129 |
Some <span style="color:#006e28">pass:q[<u>passthrough with *quoted* text</u>]</span> HTML. |
| 2130 |
|
| 2131 |
|
| 2132 |
<span style="color:#bf0303;font-weight:bold">== Table of Contents</span> |
| 2133 |
|
| 2134 |
<span style="color:#006e28">toc::[]</span> |
| 2135 |
|
| 2136 |
|
| 2137 |
<span style="color:#bf0303;font-weight:bold">== UI Buttons</span> |
| 2138 |
|
| 2139 |
Press the <span style="color:#006e28">btn:[OK]</span> button when you are finished. |
| 2140 |
|
| 2141 |
|
| 2142 |
<span style="color:#bf0303;font-weight:bold">== Escaped</span> |
| 2143 |
|
| 2144 |
This is no anchor \anchor:macro-anchor[Macro Anchor]. |
| 2145 |
|
| 2146 |
This is no button \btn:[Cancel]. |
| 2147 |
|
| 2148 |
This is no foonote\footnote:[A simple footnote.]. |
| 2149 |
|
| 2150 |
This is no foonote with id\footnoteref:[fn-1, A footnote reference.]. |
| 2151 |
|
| 2152 |
This is no image\image:logo-outline-color.svg[Tree, 25]. |
| 2153 |
|
| 2154 |
This is no icon \icon:tags[]. |
| 2155 |
|
| 2156 |
This is no keyboard shortcut \kbd:[Ctrl+M]. |
| 2157 |
|
| 2158 |
This is no menu \menu:File[Save]. |
| 2159 |
|
| 2160 |
This is no passthrough \pass:[<u>passthrough</u>]. |
| 2161 |
|
| 2162 |
|
| 2163 |
<span style="color:#bf0303;font-weight:bold">= Media</span> |
| 2164 |
<span style="color:#898887">// The name `imagesdir` is a bit misleading as audio and video use also this prefix.</span> |
| 2165 |
<span style="color:#0057ae">:imagesdir: </span><span style="color:#0057ae;font-style:italic">media</span> |
| 2166 |
|
| 2167 |
<span style="color:#bf0303;font-weight:bold">== Audio</span> |
| 2168 |
|
| 2169 |
<span style="color:#006e28">audio::test.mp3[]</span> |
| 2170 |
|
| 2171 |
<span style="color:#006e28">audio::test.mp3[options="loop"]</span> |
| 2172 |
|
| 2173 |
<span style="color:#bf0303;font-style:italic">.Escaped</span> |
| 2174 |
\audio::test.mp3[] |
| 2175 |
|
| 2176 |
|
| 2177 |
<span style="color:#bf0303;font-weight:bold">== Image</span> |
| 2178 |
|
| 2179 |
<span style="color:#bf0303;font-weight:bold">=== Block Format</span> |
| 2180 |
|
| 2181 |
<span style="color:#bf0303;font-style:italic">.Test SVG</span> |
| 2182 |
<span style="color:#644a9b">[#logo]</span> |
| 2183 |
<span style="color:#006e28">[link=https://github.com/asciidoctor/brand]</span> |
| 2184 |
<span style="color:#006e28">image::test.svg[Test, 100]</span> |
| 2185 |
|
| 2186 |
|
| 2187 |
<span style="color:#bf0303;font-weight:bold">==== Not highlighted</span> |
| 2188 |
|
| 2189 |
<span style="color:#bf0303;font-style:italic">.leading spaces, literal paragraph</span> |
| 2190 |
<span style="color:#607880"> image::test.svg[Test, 100]</span> |
| 2191 |
|
| 2192 |
<span style="color:#bf0303;font-style:italic">.trailing characters</span> |
| 2193 |
image::test.svg[Test, 100] trailing |
| 2194 |
|
| 2195 |
|
| 2196 |
<span style="color:#bf0303;font-weight:bold">==== Escaped</span> |
| 2197 |
|
| 2198 |
\image::test.svg[Asciidoctor Logo, 100] |
| 2199 |
|
| 2200 |
|
| 2201 |
<span style="color:#bf0303;font-weight:bold">=== Inline Format</span> |
| 2202 |
|
| 2203 |
Within<span style="color:#006e28">image:logo-outline-color.svg[Tree, 25]</span>some text. |
| 2204 |
|
| 2205 |
<span style="color:#006e28">NOTE:</span> There is no space needed before <span style="color:#607880">`image`</span> and none after the closing <span style="color:#607880">`]`</span>. |
| 2206 |
|
| 2207 |
<span style="color:#006e28">image:logo-outline-color.svg[Tree, 25]</span> at line start. |
| 2208 |
|
| 2209 |
At line end <span style="color:#006e28">image:logo-outline-color.svg[Tree, 25]</span> |
| 2210 |
|
| 2211 |
(<span style="color:#006e28">image:logo-outline-color.svg[Tree, 25]</span>) wrapped in non-space characters. |
| 2212 |
|
| 2213 |
|
| 2214 |
<span style="color:#bf0303;font-weight:bold">==== Not highlighted</span> |
| 2215 |
|
| 2216 |
image |
| 2217 |
|
| 2218 |
image: |
| 2219 |
|
| 2220 |
someimage: |
| 2221 |
|
| 2222 |
some:image |
| 2223 |
|
| 2224 |
some image:[] |
| 2225 |
|
| 2226 |
|
| 2227 |
<span style="color:#bf0303;font-weight:bold">==== Escaped</span> |
| 2228 |
|
| 2229 |
Within\image:logo-outline-color.svg[Tree, 25]some text. |
| 2230 |
|
| 2231 |
|
| 2232 |
<span style="color:#bf0303;font-weight:bold">== Video</span> |
| 2233 |
|
| 2234 |
<span style="color:#006e28">video::test.mp4[width=300]</span> |
| 2235 |
|
| 2236 |
<span style="color:#006e28">video::test.mp4[width=200, options=loop]</span> |
| 2237 |
|
| 2238 |
<span style="color:#bf0303;font-style:italic">.Escaped</span> |
| 2239 |
\video::test.mp4[] |
| 2240 |
|
| 2241 |
|
| 2242 |
<span style="color:#bf0303;font-weight:bold">= Page break</span> |
| 2243 |
|
| 2244 |
<span style="color:#bf0303;font-weight:bold">== Rendered as page break</span> |
| 2245 |
|
| 2246 |
<span style="font-weight:bold;text-decoration:underline"><<<</span> |
| 2247 |
|
| 2248 |
|
| 2249 |
<span style="color:#bf0303;font-weight:bold">== Not rendered as page break</span> |
| 2250 |
|
| 2251 |
<span style="color:#bf0303;font-style:italic">.Not a page break as it is indented</span> |
| 2252 |
<span style="color:#607880"> <<<</span> |
| 2253 |
|
| 2254 |
<span style="color:#bf0303;font-style:italic">.Not a page break as it has trailing non-space characters</span> |
| 2255 |
<<< extra characters |
| 2256 |
|
| 2257 |
<span style="color:#bf0303;font-style:italic">.Escaped</span> |
| 2258 |
\<<< |
| 2259 |
|
| 2260 |
|
| 2261 |
<span style="color:#bf0303;font-weight:bold">= Preprocessor</span> |
| 2262 |
|
| 2263 |
<span style="color:#bf0303;font-weight:bold">== If Defined</span> |
| 2264 |
|
| 2265 |
<span style="color:#0057ae">:!attr-1:</span> |
| 2266 |
<span style="color:#006e28">ifdef::attr-1[]</span> |
| 2267 |
This line is <span style="font-style:italic">_not_</span> rendered as the attribute is not defined. |
| 2268 |
<span style="color:#006e28">endif::[]</span> |
| 2269 |
|
| 2270 |
<span style="color:#0057ae">:attr-1:</span> |
| 2271 |
<span style="color:#006e28">ifdef::attr-1[]</span> |
| 2272 |
This line <span style="font-style:italic">_is_</span> rendered as the attribute is now defined. |
| 2273 |
<span style="color:#006e28">endif::[]</span> |
| 2274 |
|
| 2275 |
<span style="color:#bf0303;font-style:italic">.Short form avoiding </span><span style="color:#607880">`endif`</span> |
| 2276 |
<span style="color:#006e28">ifdef::attr-1[The attribute `attr-1` is defined]</span> |
| 2277 |
|
| 2278 |
|
| 2279 |
<span style="color:#bf0303;font-weight:bold">== If Not Defined</span> |
| 2280 |
|
| 2281 |
<span style="color:#0057ae">:!attr-1:</span> |
| 2282 |
<span style="color:#006e28">ifndef::some-attribute[]</span> |
| 2283 |
This line <span style="font-style:italic">_is_</span> rendered as it is inside a 'if-not-defined' statement and <span style="color:#607880">`some-attribute`</span> is not defined. |
| 2284 |
<span style="color:#006e28">endif::some-attribute[]</span> |
| 2285 |
|
| 2286 |
<span style="color:#bf0303;font-style:italic">.Short form avoiding </span><span style="color:#607880">`endif`</span> |
| 2287 |
<span style="color:#006e28">ifndef::some-attribute[The attribute `attr-1` is _not_ defined]</span> |
| 2288 |
|
| 2289 |
|
| 2290 |
<span style="color:#bf0303;font-weight:bold">== Any (or)</span> |
| 2291 |
|
| 2292 |
<span style="color:#0057ae">:!attr-1:</span> |
| 2293 |
<span style="color:#0057ae">:!attr-2:</span> |
| 2294 |
<span style="color:#0057ae">:attr-3:</span> |
| 2295 |
<span style="color:#006e28">ifdef::attr-1,attr-2,attr-3[]</span> |
| 2296 |
This line is rendered as at least one of the attributes is defined. |
| 2297 |
<span style="color:#006e28">endif::[]</span> |
| 2298 |
|
| 2299 |
<span style="color:#0057ae">:!attr-1:</span> |
| 2300 |
<span style="color:#0057ae">:!attr-2:</span> |
| 2301 |
<span style="color:#0057ae">:!attr-3:</span> |
| 2302 |
<span style="color:#006e28">ifdef::attr-1,attr-2,attr-3[]</span> |
| 2303 |
This line is not rendered as none of the attributes is defined. |
| 2304 |
<span style="color:#006e28">endif::[]</span> |
| 2305 |
|
| 2306 |
|
| 2307 |
<span style="color:#bf0303;font-weight:bold">== None (nor)</span> |
| 2308 |
|
| 2309 |
<span style="color:#0057ae">:!attr-1:</span> |
| 2310 |
<span style="color:#0057ae">:!attr-2:</span> |
| 2311 |
<span style="color:#0057ae">:!attr-3:</span> |
| 2312 |
<span style="color:#006e28">ifndef::attr-1,attr-2,attr-3[]</span> |
| 2313 |
This line is rendered as none of the attributes is defined. |
| 2314 |
<span style="color:#006e28">endif::[]</span> |
| 2315 |
|
| 2316 |
<span style="color:#0057ae">:!attr-1:</span> |
| 2317 |
<span style="color:#0057ae">:!attr-2:</span> |
| 2318 |
<span style="color:#0057ae">:attr-3:</span> |
| 2319 |
<span style="color:#006e28">ifndef::attr-1,attr-2,attr-3[]</span> |
| 2320 |
This line is not rendered as at least one of the attributes is defined. |
| 2321 |
<span style="color:#006e28">endif::[]</span> |
| 2322 |
|
| 2323 |
|
| 2324 |
<span style="color:#bf0303;font-weight:bold">== All (and)</span> |
| 2325 |
|
| 2326 |
<span style="color:#0057ae">:attr-1:</span> |
| 2327 |
<span style="color:#0057ae">:attr-2:</span> |
| 2328 |
<span style="color:#0057ae">:attr-3:</span> |
| 2329 |
<span style="color:#006e28">ifdef::attr-1+attr-2+attr-3[]</span> |
| 2330 |
This line is rendered as all the attributes are defined. |
| 2331 |
<span style="color:#006e28">endif::[]</span> |
| 2332 |
|
| 2333 |
<span style="color:#0057ae">:attr-1:</span> |
| 2334 |
<span style="color:#0057ae">:attr-2:</span> |
| 2335 |
<span style="color:#0057ae">:!attr-3:</span> |
| 2336 |
<span style="color:#006e28">ifndef::attr-1+attr-2+attr-3[]</span> |
| 2337 |
This line is not rendered as at least one of the attributes is not defined. |
| 2338 |
<span style="color:#006e28">endif::[]</span> |
| 2339 |
|
| 2340 |
|
| 2341 |
<span style="color:#bf0303;font-weight:bold">== Not All (nand)</span> |
| 2342 |
|
| 2343 |
<span style="color:#0057ae">:attr-1:</span> |
| 2344 |
<span style="color:#0057ae">:attr-2:</span> |
| 2345 |
<span style="color:#0057ae">:!attr-3:</span> |
| 2346 |
<span style="color:#006e28">ifndef::attr-1+attr-2+attr-3[]</span> |
| 2347 |
This line is rendered as at least one of the attributes is defined. |
| 2348 |
<span style="color:#006e28">endif::[]</span> |
| 2349 |
|
| 2350 |
<span style="color:#0057ae">:attr-1:</span> |
| 2351 |
<span style="color:#0057ae">:attr-2:</span> |
| 2352 |
<span style="color:#0057ae">:attr-3:</span> |
| 2353 |
<span style="color:#006e28">ifndef::attr-1+attr-2+attr-3[]</span> |
| 2354 |
This line is not rendered as all the attributes are not defined. |
| 2355 |
<span style="color:#006e28">endif::[]</span> |
| 2356 |
|
| 2357 |
|
| 2358 |
<span style="color:#bf0303;font-weight:bold">== If Eval</span> |
| 2359 |
|
| 2360 |
<span style="color:#0057ae">:two: </span><span style="color:#0057ae;font-style:italic">2</span> |
| 2361 |
<span style="color:#006e28">ifeval::[{two} > 1]</span> |
| 2362 |
This line is rendered as the expression evaluates to true. |
| 2363 |
<span style="color:#006e28">endif::[]</span> |
| 2364 |
|
| 2365 |
<span style="color:#0057ae">:not-true: </span><span style="color:#0057ae;font-style:italic">false</span> |
| 2366 |
<span style="color:#006e28">ifeval::[{not-true} == true]</span> |
| 2367 |
This line is not rendered as the expression evaluates to false. |
| 2368 |
<span style="color:#006e28">endif::[]</span> |
| 2369 |
|
| 2370 |
|
| 2371 |
<span style="color:#bf0303;font-weight:bold">== Escaped</span> |
| 2372 |
|
| 2373 |
<span style="color:#0057ae">:!attr-1:</span> |
| 2374 |
\ifdef::attr-1[] |
| 2375 |
This line is rendered as the <span style="color:#607880">`ifdef`</span>-statement is escaped. |
| 2376 |
\endif::[] |
| 2377 |
|
| 2378 |
<span style="color:#0057ae">:!attr-1:</span> |
| 2379 |
\ifndef::some-attribute[Only if the attribute is not defined] |
| 2380 |
This line is rendered as the <span style="color:#607880">`ifndef`</span>-statement is escaped. |
| 2381 |
\endif::some-attribute[] |
| 2382 |
|
| 2383 |
<span style="color:#0057ae">:not-true: </span><span style="color:#0057ae;font-style:italic">false</span> |
| 2384 |
\ifeval::[<span style="color:#0057ae">{not-true}</span> == true] |
| 2385 |
This line is rendered as the <span style="color:#607880">`ifeval`</span>-statement is escaped. |
| 2386 |
\endif::[] |
| 2387 |
|
| 2388 |
|
| 2389 |
<span style="color:#bf0303;font-weight:bold">= Quote and Verse</span> |
| 2390 |
|
| 2391 |
<span style="color:#bf0303;font-weight:bold">== Quote</span> |
| 2392 |
|
| 2393 |
<span style="color:#bf0303;font-style:italic">.Contiguous block / paragraph</span> |
| 2394 |
<span style="color:#006e28">[quote, attribution, citation title and information]</span> |
| 2395 |
<span style="color:#644a9b">[[quote-block-id]]</span> |
| 2396 |
Inside the <span style="font-weight:bold">*contiguous block quote*</span>. |
| 2397 |
Last line of the quote block. |
| 2398 |
|
| 2399 |
This line is not part of the contiguous block quote anymore. |
| 2400 |
|
| 2401 |
<span style="color:#bf0303;font-style:italic">.Delimited with block name</span> |
| 2402 |
<span style="color:#006e28">[quote, attribution, citation title and information]</span> |
| 2403 |
<span style="color:#644a9b">[[quote-block-id]]</span> |
| 2404 |
<span style="color:#006e28;font-weight:bold">____</span> |
| 2405 |
Inside the <span style="font-weight:bold">*delimited block quote*</span>. |
| 2406 |
|
| 2407 |
May contain emtpy lines. |
| 2408 |
<span style="color:#006e28;font-weight:bold">____</span> |
| 2409 |
|
| 2410 |
<span style="color:#bf0303;font-style:italic">.Delimited without block name</span> |
| 2411 |
<span style="color:#644a9b">[[quote-block-id]]</span> |
| 2412 |
<span style="color:#006e28;font-weight:bold">____</span> |
| 2413 |
Inside the <span style="font-weight:bold">*delimited block quote*</span>. |
| 2414 |
|
| 2415 |
May contain emtpy lines. |
| 2416 |
<span style="color:#006e28;font-weight:bold">____</span> |
| 2417 |
|
| 2418 |
<span style="color:#bf0303;font-style:italic">.Using an open block</span> |
| 2419 |
<span style="color:#006e28">[quote]</span> |
| 2420 |
<span style="color:#644a9b">[[quote-block-id]]</span> |
| 2421 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 2422 |
Inside the <span style="font-weight:bold">*open block quote*</span>. |
| 2423 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 2424 |
|
| 2425 |
<span style="color:#bf0303;font-style:italic">.Nested block quote</span> |
| 2426 |
<span style="color:#006e28">[quote, outer attribution, outer citation title and information]</span> |
| 2427 |
<span style="color:#644a9b">[[quote-block-id]]</span> |
| 2428 |
<span style="color:#006e28;font-weight:bold">____</span> |
| 2429 |
First line of outer quote. |
| 2430 |
<span style="color:#006e28">[quote, inner attribution, inner citation title and information]</span> |
| 2431 |
<span style="color:#644a9b">[[quote-block-id]]</span> |
| 2432 |
<span style="color:#006e28;font-weight:bold">______</span> |
| 2433 |
Inside the inner quote. |
| 2434 |
<span style="color:#006e28;font-weight:bold">______</span> |
| 2435 |
Last line of outer quote. |
| 2436 |
<span style="color:#006e28;font-weight:bold">____</span> |
| 2437 |
|
| 2438 |
<span style="color:#898887">// Currently no specific highlighting supported.</span> |
| 2439 |
<span style="color:#bf0303;font-style:italic">.Quoted paragraph</span> |
| 2440 |
"Inside the <span style="font-weight:bold">*quoted paragraph*</span>. |
| 2441 |
As being a paragraph, no empty lines are supported." |
| 2442 |
<span style="font-weight:bold;text-decoration:underline">--</span> attribution, citation title and information |
| 2443 |
|
| 2444 |
|
| 2445 |
<span style="color:#bf0303;font-style:italic">.Air quote</span> |
| 2446 |
<span style="color:#006e28">[,attribution, citation title and information]</span> |
| 2447 |
<span style="color:#006e28;font-weight:bold">"" </span> |
| 2448 |
Inside the <span style="font-weight:bold">*air quote*</span>. |
| 2449 |
|
| 2450 |
Supports empty lines. |
| 2451 |
<span style="color:#006e28;font-weight:bold">""</span> |
| 2452 |
|
| 2453 |
<span style="color:#898887">// Currently no specific highlighting supported.</span> |
| 2454 |
<span style="color:#bf0303;font-style:italic">.Markdown style</span> |
| 2455 |
> Inside the <span style="font-weight:bold">*markdown quote*</span>. |
| 2456 |
> |
| 2457 |
> May contain emtpy lines. |
| 2458 |
> <span style="font-weight:bold;text-decoration:underline">--</span> attribution, citation title and information |
| 2459 |
|
| 2460 |
<span style="color:#898887">// Currently no specific highlighting supported.</span> |
| 2461 |
<span style="color:#bf0303;font-style:italic">.Nested markdown style</span> |
| 2462 |
> Start of outer quote. |
| 2463 |
> |
| 2464 |
> > Some inner quote. |
| 2465 |
> |
| 2466 |
> * can use AsciiDoc <span style="font-weight:bold;text-decoration:underline">...</span> |
| 2467 |
> * inside markdown block |
| 2468 |
> |
| 2469 |
> > Another inner quote. |
| 2470 |
> |
| 2471 |
> End of outer quote. |
| 2472 |
|
| 2473 |
|
| 2474 |
<span style="color:#bf0303;font-weight:bold">== Verse</span> |
| 2475 |
|
| 2476 |
<span style="color:#bf0303;font-style:italic">.Contiguous block / paragraph</span> |
| 2477 |
<span style="color:#006e28">[verse, attribution, citation title and information]</span> |
| 2478 |
<span style="color:#644a9b">[[verse-block-id]]</span> |
| 2479 |
Inside the <span style="font-weight:bold">*contiguous block verse*</span>. |
| 2480 |
Second line of the verse block. |
| 2481 |
|
| 2482 |
This line is not part of the contiguous verse block anymore. |
| 2483 |
|
| 2484 |
<span style="color:#bf0303;font-style:italic">.Delimited block with name</span> |
| 2485 |
<span style="color:#006e28">[verse, attribution, citation title and information]</span> |
| 2486 |
<span style="color:#644a9b">[[verse-block-id]]</span> |
| 2487 |
<span style="color:#006e28;font-weight:bold">____</span> |
| 2488 |
Inside the <span style="font-weight:bold">*delimited block verse*</span>. |
| 2489 |
|
| 2490 |
Supports empty lines. |
| 2491 |
<span style="color:#006e28;font-weight:bold">____</span> |
| 2492 |
|
| 2493 |
<span style="color:#bf0303;font-style:italic">.Delimited block without name</span> |
| 2494 |
This would be rendered as a quote block as the same delimiters are used. |
| 2495 |
|
| 2496 |
<span style="color:#bf0303;font-style:italic">.Using an open block</span> |
| 2497 |
<span style="color:#006e28">[verse, attribution, citation title and information]</span> |
| 2498 |
<span style="color:#644a9b">[[verse-block-id]]</span> |
| 2499 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 2500 |
Inside the <span style="font-weight:bold">*open block verse*</span>. |
| 2501 |
<span style="color:#006e28;font-weight:bold">--</span> |
| 2502 |
|
| 2503 |
|
| 2504 |
<span style="color:#bf0303;font-weight:bold">= Replacement</span> |
| 2505 |
|
| 2506 |
<span style="color:#006e28">TIP:</span> See also the <span style="color:#0057ae;text-decoration:underline">https://asciidoctor.org/docs/user-manual/#replacements[corresponding section]</span> in the Asciidoctor manual. |
| 2507 |
|
| 2508 |
|
| 2509 |
<span style="color:#bf0303;font-weight:bold">== Textual symbol replacements</span> |
| 2510 |
|
| 2511 |
<span style="color:#006e28;font-weight:bold">|===</span> |
| 2512 |
<span style="color:#006e28;font-weight:bold">|</span>Name <span style="color:#006e28;font-weight:bold">|</span>Syntax <span style="color:#006e28;font-weight:bold">|</span>Escaped |
| 2513 |
|
| 2514 |
<span style="color:#006e28;font-weight:bold">|</span>copyright <span style="color:#006e28;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">(C)</span> <span style="color:#006e28;font-weight:bold">|</span>\(C) |
| 2515 |
<span style="color:#006e28;font-weight:bold">|</span>registered <span style="color:#006e28;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">(R)</span> <span style="color:#006e28;font-weight:bold">|</span>\(R) |
| 2516 |
<span style="color:#006e28;font-weight:bold">|</span>trademark <span style="color:#006e28;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">(TM)</span> <span style="color:#006e28;font-weight:bold">|</span>\(TM) |
| 2517 |
|
| 2518 |
<span style="color:#006e28;font-weight:bold">|</span>apostrophe <span style="color:#006e28;font-weight:bold">|</span>KDE<span style="font-weight:bold;text-decoration:underline">'</span>s <span style="color:#006e28;font-weight:bold">|</span>KDE\'s |
| 2519 |
<span style="color:#006e28;font-weight:bold">|</span>ellipses <span style="color:#006e28;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">...</span> <span style="color:#006e28;font-weight:bold">|</span>\... <span style="color:#006e28">footnote:[Escaping has no effect]</span> |
| 2520 |
<span style="color:#006e28;font-weight:bold">|</span>m dash <span style="color:#006e28;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">--</span> <span style="color:#006e28;font-weight:bold">|</span>\-- <span style="color:#006e28">footnote:[Escaping yields another different dash]</span> |
| 2521 |
|
| 2522 |
<span style="color:#006e28;font-weight:bold">|</span>left single arrow <span style="color:#006e28;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline"><-</span> <span style="color:#006e28;font-weight:bold">|</span>\<- |
| 2523 |
<span style="color:#006e28;font-weight:bold">|</span>right single arrow <span style="color:#006e28;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">-></span> <span style="color:#006e28;font-weight:bold">|</span>\-> |
| 2524 |
<span style="color:#006e28;font-weight:bold">|</span>left double arrow <span style="color:#006e28;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline"><=</span> <span style="color:#006e28;font-weight:bold">|</span>\<= |
| 2525 |
<span style="color:#006e28;font-weight:bold">|</span>right double arrow <span style="color:#006e28;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">=></span> <span style="color:#006e28;font-weight:bold">|</span>\=> |
| 2526 |
<span style="color:#006e28;font-weight:bold">|===</span> |
| 2527 |
|
| 2528 |
|
| 2529 |
<span style="color:#bf0303;font-weight:bold">=== Not replaced</span> |
| 2530 |
|
| 2531 |
<span style="color:#898887">// Single apostrophe must be surrounded by alphabetic characters.</span> |
| 2532 |
<span style="font-weight:bold">*</span> a' |
| 2533 |
<span style="font-weight:bold">*</span> 'a |
| 2534 |
<span style="font-weight:bold">*</span> .'. |
| 2535 |
<span style="font-weight:bold">*</span> a'. |
| 2536 |
<span style="font-weight:bold">*</span> .'a |
| 2537 |
|
| 2538 |
|
| 2539 |
<span style="color:#bf0303;font-weight:bold">== Numerical Character Reference</span> |
| 2540 |
|
| 2541 |
<span style="color:#bf0303;font-weight:bold">=== Decimal</span> |
| 2542 |
|
| 2543 |
<span style="font-weight:bold;text-decoration:underline">&#0167;</span> |
| 2544 |
|
| 2545 |
<span style="color:#b08000">##before##</span><span style="font-weight:bold;text-decoration:underline">&#0167;</span><span style="color:#b08000">##after##</span> |
| 2546 |
|
| 2547 |
<span style="font-weight:bold;text-decoration:underline">&#167;</span> |
| 2548 |
|
| 2549 |
|
| 2550 |
<span style="color:#bf0303;font-weight:bold">=== Hexadecimal</span> |
| 2551 |
|
| 2552 |
<span style="font-weight:bold;text-decoration:underline">&#x00A7;</span> |
| 2553 |
|
| 2554 |
<span style="color:#b08000">##before##</span><span style="font-weight:bold;text-decoration:underline">&#x00A7;</span><span style="color:#b08000">##after##</span> |
| 2555 |
|
| 2556 |
<span style="font-weight:bold;text-decoration:underline">&#xA7;</span> |
| 2557 |
|
| 2558 |
|
| 2559 |
<span style="color:#bf0303;font-weight:bold">=== Escaped</span> |
| 2560 |
|
| 2561 |
\&#0167; |
| 2562 |
\&#167; |
| 2563 |
\&#x00A7; |
| 2564 |
\&#xA7; |
| 2565 |
|
| 2566 |
|
| 2567 |
<span style="color:#bf0303;font-weight:bold">== HTML/XML Character Entity References</span> |
| 2568 |
|
| 2569 |
See e.g. <span style="color:#0057ae;text-decoration:underline">https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references[Wikipedia]</span>. |
| 2570 |
|
| 2571 |
<span style="color:#006e28">IMPORTANT:</span> Highlighting of HTML/XML character entity references is <span style="font-style:italic">_not_</span> supported. |
| 2572 |
There are just too many of them. |
| 2573 |
|
| 2574 |
<span style="color:#898887">// some examples</span> |
| 2575 |
<span style="color:#006e28;font-weight:bold">====</span> |
| 2576 |
&ne; |
| 2577 |
&equiv; |
| 2578 |
<span style="color:#006e28;font-weight:bold">====</span> |
| 2579 |
|
| 2580 |
|
| 2581 |
<span style="color:#bf0303;font-weight:bold">= Section L0</span> |
| 2582 |
|
| 2583 |
<span style="color:#006e28">[abstract]</span> |
| 2584 |
<span style="color:#bf0303;font-weight:bold">== Abstract</span> |
| 2585 |
|
| 2586 |
This document is used for testing various aspects of syntax highlighting regarding sections. |
| 2587 |
|
| 2588 |
<span style="color:#0057ae">:title-attribute: </span><span style="color:#0057ae;font-style:italic">with attribute</span> |
| 2589 |
|
| 2590 |
<span style="color:#bf0303;font-weight:bold">== Section L1</span> |
| 2591 |
|
| 2592 |
<span style="color:#bf0303;font-weight:bold">=== Section L2</span> |
| 2593 |
|
| 2594 |
<span style="color:#bf0303;font-weight:bold">==== Section L3</span> |
| 2595 |
|
| 2596 |
<span style="color:#bf0303;font-weight:bold">===== Section L4</span> |
| 2597 |
|
| 2598 |
<span style="color:#bf0303;font-weight:bold">====== Section L5</span> |
| 2599 |
|
| 2600 |
======= This is not a new section |
| 2601 |
|
| 2602 |
The level would be too deep. |
| 2603 |
Only sections up to level 5 (having 6 leading <span style="color:#607880">`=`</span>) are supported. |
| 2604 |
|
| 2605 |
|
| 2606 |
<span style="color:#bf0303;font-weight:bold">#### Section L3</span> |
| 2607 |
|
| 2608 |
Using Markdown section syntax works too. |
| 2609 |
|
| 2610 |
=<span style="color:#b08000">#=#</span> This is not a section. |
| 2611 |
Use either <span style="color:#607880">`=`</span> or <span style="color:#607880">`#`</span>, but not mixed. |
| 2612 |
|
| 2613 |
|
| 2614 |
<span style="color:#bf0303;font-weight:bold">===== </span><span style="color:#644a9b">[[id-1]]</span><span style="color:#bf0303;font-weight:bold"> </span><span style="color:#644a9b">[[id-2]]</span><span style="color:#bf0303;font-weight:bold"> Section L4</span> |
| 2615 |
|
| 2616 |
This section has leading additional achors. |
| 2617 |
|
| 2618 |
|
| 2619 |
<span style="color:#bf0303;font-weight:bold">==== Section L3 </span><span style="color:#644a9b">[[id-1]][[id-2]]</span> |
| 2620 |
|
| 2621 |
This section has trailing additional anchors. |
| 2622 |
|
| 2623 |
|
| 2624 |
<span style="color:#bf0303;font-weight:bold">==== </span><span style="color:#644a9b">[[id-1]][[id-2]]</span><span style="color:#bf0303;font-weight:bold">Section L3</span><span style="color:#644a9b">[[id-3]][[id-4]]</span> |
| 2625 |
|
| 2626 |
This section has both leading and trailing additional anchors. |
| 2627 |
|
| 2628 |
|
| 2629 |
<span style="color:#bf0303;font-weight:bold">==== Section L3 </span><span style="color:#0057ae">{title-attribute}</span><span style="color:#bf0303;font-weight:bold"> in Title</span> |
| 2630 |
|
| 2631 |
<span style="color:#bf0303;font-style:italic">.Title </span><span style="color:#0057ae">{title-attribute}</span> |
| 2632 |
This section has an attribute in its title. |
| 2633 |
|
| 2634 |
|
| 2635 |
<span style="color:#006e28">[discrete]</span> |
| 2636 |
<span style="color:#bf0303;font-weight:bold">== Discrete Section</span> |
| 2637 |
|
| 2638 |
This section will not be shown in the table of contents. |
| 2639 |
|
| 2640 |
<span style="color:#898887">////</span> |
| 2641 |
<span style="color:#898887">== Section with _emphasized_ text</span> |
| 2642 |
|
| 2643 |
<span style="color:#898887">=== Section with escaped \_emphasized_ text</span> |
| 2644 |
<span style="color:#898887">////</span> |
| 2645 |
|
| 2646 |
|
| 2647 |
<span style="color:#bf0303;font-weight:bold">== Section with </span><span style="color:#b08000">#marked#</span><span style="color:#bf0303;font-weight:bold"> text</span> |
| 2648 |
|
| 2649 |
<span style="color:#bf0303;font-weight:bold">=== Section with escaped \</span>#<span style="color:#bf0303;font-weight:bold">marked# text</span> |
| 2650 |
|
| 2651 |
|
| 2652 |
<span style="color:#bf0303;font-weight:bold">== Section with </span><span style="color:#607880">`monospaced`</span><span style="color:#bf0303;font-weight:bold"> text</span> |
| 2653 |
|
| 2654 |
<span style="color:#bf0303;font-weight:bold">=== Section with escaped \</span>`<span style="color:#bf0303;font-weight:bold">monospaced` text</span> |
| 2655 |
|
| 2656 |
<span style="color:#898887">////</span> |
| 2657 |
<span style="color:#898887">== Section with *strong* text</span> |
| 2658 |
|
| 2659 |
<span style="color:#898887">=== Section with escaped \*strong* text</span> |
| 2660 |
<span style="color:#898887">////</span> |
| 2661 |
|
| 2662 |
|
| 2663 |
<span style="color:#bf0303;font-weight:bold">= Another Section at Level 0</span> |
| 2664 |
|
| 2665 |
Some text in the second level 0 section. |
| 2666 |
|
| 2667 |
<span style="color:#bf0303;font-weight:bold">== Section 2.1</span> |
| 2668 |
|
| 2669 |
Some text. |
| 2670 |
|
| 2671 |
|
| 2672 |
<span style="color:#bf0303;font-weight:bold">= Table</span> |
| 2673 |
|
| 2674 |
<span style="color:#bf0303;font-weight:bold">== Default Separator</span> |
| 2675 |
|
| 2676 |
<span style="color:#bf0303;font-style:italic">.PSV</span> |
| 2677 |
<span style="color:#898887">// some comment</span> |
| 2678 |
<span style="color:#644a9b">[[table-1]]</span> |
| 2679 |
<span style="color:#006e28">[.some-role]</span> |
| 2680 |
<span style="color:#644a9b">[#table-shorthand]</span> |
| 2681 |
<span style="color:#898887">// some comment</span> |
| 2682 |
<span style="color:#006e28;font-weight:bold">|===</span> |
| 2683 |
<span style="color:#898887">// some comment</span> |
| 2684 |
<span style="color:#006e28;font-weight:bold">|</span> header col 1 <span style="color:#006e28;font-weight:bold">|</span> header col 2 <span style="color:#006e28;font-weight:bold">|</span> header col 3 |
| 2685 |
<span style="color:#898887">// some comment</span> |
| 2686 |
|
| 2687 |
<span style="color:#898887">// with escaped cell separator</span> |
| 2688 |
<span style="color:#006e28;font-weight:bold">|</span> row 1 \| col 1 <span style="color:#006e28;font-weight:bold">|</span> row 1 col 2 <span style="color:#006e28;font-weight:bold">|</span> row 1 col 3 |
| 2689 |
<span style="color:#898887">// no spaces needed around `|`</span> |
| 2690 |
<span style="color:#006e28;font-weight:bold">|</span> <span style="font-weight:bold">*row*</span> 2 col 1<span style="color:#006e28;font-weight:bold">|</span>row 2 col 2<span style="color:#006e28;font-weight:bold">|</span>row 2 col 3 |
| 2691 |
|
| 2692 |
<span style="color:#006e28;font-weight:bold">|</span>row 3 col 1 |
| 2693 |
<span style="color:#898887">// using attribute</span> |
| 2694 |
<span style="color:#006e28;font-weight:bold">|</span> row 3 col 2 <span style="color:#0057ae">{vbar}</span> |
| 2695 |
<span style="color:#006e28;font-weight:bold">|</span>ro3 3 col 3 |
| 2696 |
|
| 2697 |
<span style="color:#006e28;font-weight:bold">|</span> row 4 col 1 <span style="color:#006e28;font-weight:bold">a|</span>some AsciiDoc in col 2 row 4 |
| 2698 |
|
| 2699 |
<span style="font-weight:bold">*</span> item 1 |
| 2700 |
<span style="font-weight:bold">*</span> item 2 |
| 2701 |
<span style="color:#006e28;font-weight:bold">|</span>row 4 col 3 |
| 2702 |
|
| 2703 |
<span style="color:#006e28;font-weight:bold">2*|</span> row 5 has same contents in first 2 columns |
| 2704 |
<span style="color:#006e28;font-weight:bold">|</span>row 5 col 3 |
| 2705 |
|
| 2706 |
<span style="color:#006e28;font-weight:bold">|</span>row 6 col 1 <span style="color:#006e28;font-weight:bold">2+|</span> span row 6 in col 2 and 3 |
| 2707 |
|
| 2708 |
<span style="color:#006e28;font-weight:bold">.2+|</span>span col 1 in row 6 and 7<span style="color:#006e28;font-weight:bold">|</span>row 6 col 2<span style="color:#006e28;font-weight:bold">|</span>row 6 col 3 |
| 2709 |
<span style="color:#006e28;font-weight:bold">|</span>row 7 col 2<span style="color:#006e28;font-weight:bold">|</span>row 7 col 3 |
| 2710 |
|
| 2711 |
<span style="color:#006e28;font-weight:bold">2.2+^.^|</span>span col 1 and 2 in row 8 and 9<span style="color:#006e28;font-weight:bold">|</span>row 8 col 3 |
| 2712 |
<span style="color:#006e28;font-weight:bold">|</span>row 9 col 3 |
| 2713 |
|
| 2714 |
<span style="color:#006e28;font-weight:bold">e|</span>row 10 col 1 is emphasized (italic) |
| 2715 |
<span style="color:#006e28;font-weight:bold">s|</span>row 10 col 2 is strong (bold) |
| 2716 |
<span style="color:#006e28;font-weight:bold">m|</span>row 10 col 3 is monospaced |
| 2717 |
<span style="color:#006e28;font-weight:bold">|===</span> |
| 2718 |
|
| 2719 |
|
| 2720 |
<span style="color:#bf0303;font-weight:bold">== Custom Separator</span> |
| 2721 |
|
| 2722 |
<span style="color:#006e28">IMPORTANT:</span> Highlighting of tables with custom separator is not supported. |
| 2723 |
All <span style="color:#607880">`|`</span> inside the table will be falsly highlighted. |
| 2724 |
|
| 2725 |
<span style="color:#006e28">[separator=!]</span> |
| 2726 |
<span style="color:#006e28;font-weight:bold">|===</span> |
| 2727 |
<span style="color:#898887">// the `|` in the line below should not be highlighted.</span> |
| 2728 |
!row 1 <span style="color:#006e28;font-weight:bold">|</span> col 1 !row 1 col 2 |
| 2729 |
s!row 2 col 1 !row 2 col 2 |
| 2730 |
<span style="color:#006e28;font-weight:bold">|===</span> |
| 2731 |
|
| 2732 |
<span style="color:#006e28">[separator=a]</span> |
| 2733 |
<span style="color:#006e28;font-weight:bold">|===</span> |
| 2734 |
arow 1 col 1 arow 1 col 2 |
| 2735 |
sarow 2 col 1 arow 2 col 2 |
| 2736 |
<span style="color:#006e28;font-weight:bold">|===</span> |
| 2737 |
|
| 2738 |
|
| 2739 |
<span style="color:#bf0303;font-weight:bold">== Delimiter-Separated Values</span> |
| 2740 |
|
| 2741 |
<span style="color:#006e28">IMPORTANT:</span> Highlighting for tables with delimiter-separated values is not supported. |
| 2742 |
All <span style="color:#607880">`|`</span> inside the table will be falsly highlighted. |
| 2743 |
|
| 2744 |
<span style="color:#006e28">[format=csv]</span> |
| 2745 |
<span style="color:#006e28;font-weight:bold">|===</span> |
| 2746 |
Col 1 ,Col 2 ,Col 3 |
| 2747 |
|
| 2748 |
<span style="color:#898887">// the `|` in the line below should not be highlighted.</span> |
| 2749 |
row 1 <span style="color:#006e28;font-weight:bold">|</span> col 1 ,row 1 col 2 ,row 1 col 3 |
| 2750 |
row 2 col 2,row 2 col 2,row 2 col 3 |
| 2751 |
|
| 2752 |
row 3 col 3 , "row ""3"", col 2" , row 3 col 3 |
| 2753 |
<span style="color:#006e28;font-weight:bold">|===</span> |
| 2754 |
|
| 2755 |
|
| 2756 |
<span style="color:#bf0303;font-weight:bold">=== Shorthand Notation for Data Tables</span> |
| 2757 |
|
| 2758 |
<span style="color:#bf0303;font-style:italic">.CSV</span> |
| 2759 |
,=== |
| 2760 |
Col 1 ,Col 2 ,Col 3 |
| 2761 |
|
| 2762 |
row 1 col 1 ,row 1 col 2 ,row 1 col 3 |
| 2763 |
row 2 col 2,row 2 col 2,row 2 col 3 |
| 2764 |
|
| 2765 |
row 3 col 3 , "row ""3"", col 2" , row 3 col 3 |
| 2766 |
,=== |
| 2767 |
|
| 2768 |
<span style="color:#bf0303;font-style:italic">.DSV</span> |
| 2769 |
:=== |
| 2770 |
Col 1 :Col 2 :Col 3 |
| 2771 |
|
| 2772 |
row 1 col 1 :row 1 col 2 :row 1 col 3 |
| 2773 |
row 2 col 2:row 2 col 2:row 2 col 3 |
| 2774 |
row 3 col 3 : row 3 col 2 : row 3 col 3 |
| 2775 |
:=== |
| 2776 |
|
| 2777 |
|
| 2778 |
</pre></body></html> |