2779 lines
137 KiB
HTML
2779 lines
137 KiB
HTML
<!DOCTYPE html>
|
|
<html><head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<title>asciidoc.adoc</title>
|
|
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (AsciiDoc) - Theme (Breeze Dark)"/>
|
|
</head><body style="background-color:#232629;color:#cfcfc2"><pre>
|
|
<span style="font-weight:bold">= AsciiDoc Syntax Highlighting</span>
|
|
<span style="color:#7a7c7d">// There are multiple level 0 sections, so use book instead of article.</span>
|
|
<span style="color:#27aeae">:doctype: </span><span style="color:#27aeae;font-style:italic">book</span>
|
|
<span style="color:#7a7c7d">// For nice admonition and callout icons.</span>
|
|
<span style="color:#27aeae">:icons: </span><span style="color:#27aeae;font-style:italic">font</span>
|
|
<span style="color:#27aeae">:toc: </span><span style="color:#27aeae;font-style:italic">left</span>
|
|
|
|
Testing the syntax highlighting support in KDE Frameworks.
|
|
|
|
The first of the following sections lists the things that are known not to work.
|
|
Further sections are intended for testing the supported features of AsciiDoc.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Known Not to Work</span>
|
|
|
|
There are a couple of things that are known not to work.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Block</span>
|
|
|
|
<span style="font-weight:bold">*</span> Highlighting of attributes inside a block title.
|
|
|
|
<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>
|
|
<span style="font-weight:bold">**</span> <span style="color:#f67400">#marked#</span>
|
|
<span style="font-weight:bold">**</span> <span style="color:#a43340">`monospaced`</span>
|
|
|
|
<span style="font-weight:bold">*</span> Code folding for contiguous blocks.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
This has an advantage too, though.
|
|
It enables the user to decide on having code folding or not.
|
|
For short blocks without empty lines where no code folding is desired, use contiguous blocks.
|
|
For longer blocks which should support code folding, use delimited blocks.
|
|
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://asciidoctor.org/docs/user-manual/#discrete-headings[Discrete headings]</span> inside block.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
<span style="color:#27ae60;font-weight:bold">-----</span>
|
|
<span style="color:#a43340">****</span>
|
|
<span style="color:#a43340">Some text.</span>
|
|
|
|
<span style="color:#a43340">[discrete]</span>
|
|
<span style="color:#a43340">=== Discrete Heading</span>
|
|
|
|
<span style="color:#a43340">Some more text.</span>
|
|
<span style="color:#a43340">****</span>
|
|
<span style="color:#27ae60;font-weight:bold">-----</span>
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
Syntax highlighting does not recognize discrete headings inside a block.
|
|
If a normal section title is marked as being discrete, highlighting works.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Custom Styles</span>
|
|
|
|
<span style="font-weight:bold">*</span> Highlighting of formatted text within the phrase to be styled.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
<span style="color:#a43340"> Some [big]#big and *strong*# text.</span>
|
|
|
|
<span style="font-weight:bold">*</span> Highlighting of styles with a phrase that spans multiple lines.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340">[big]#this</span>
|
|
<span style="color:#a43340">is</span>
|
|
<span style="color:#a43340">not</span>
|
|
<span style="color:#a43340">highlighted#</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Formatted/Quoted Text</span>
|
|
|
|
<span style="font-weight:bold">*</span> Highlighting of formatted/quoted text (e.g. monospaced) that spans multiple lines.
|
|
|
|
<span style="font-weight:bold">*</span> Highlighting combinations besides those of emphasized, strong and monospaced.
|
|
<span style="font-weight:bold">**</span> Attributes inside other formatting.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
<span style="color:#a43340"> `{attribute-id} inside monospaced`</span>
|
|
|
|
<span style="font-weight:bold">**</span> Passthrough inside other formatting.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
<span style="color:#a43340"> `+passthrough+ inside monospaced`</span>
|
|
|
|
<span style="font-weight:bold">**</span> Marked text inside other formatting.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
<span style="color:#a43340"> `#marked# inside monospaced`</span>
|
|
|
|
<span style="font-weight:bold">**</span> Subscript inside other formatting.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
<span style="color:#a43340"> `~sub~script inside monospaced`</span>
|
|
|
|
<span style="font-weight:bold">**</span> Superscript inside other formatting.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
<span style="color:#a43340"> `^super^script inside monospaced`</span>
|
|
|
|
And even more complex combinations.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== List</span>
|
|
|
|
<span style="font-weight:bold">*</span> Inside a list, indented lines without leading asterisks or hyphen start highlighting for a verbatim paragraph.
|
|
Asciidoctor renders this as normal text.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Macro</span>
|
|
|
|
<span style="font-weight:bold">*</span> Highlighting of macros with a text argument that spans multiple lines.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340">xref:id[this works just fine]</span>
|
|
|
|
<span style="color:#a43340">xref:id[</span>
|
|
<span style="color:#a43340">highlighting a macro with</span>
|
|
<span style="color:#a43340">a text that spans multiples</span>
|
|
<span style="color:#a43340">does not work</span>
|
|
<span style="color:#a43340">]</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Quote, Verse</span>
|
|
|
|
<span style="font-weight:bold">*</span> Highlighting for single quote symbol <span style="color:#a43340">`"`</span>.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
Highlighting for air quotes <span style="color:#a43340">`""`</span> is supported.
|
|
|
|
<span style="font-weight:bold">*</span> Highlighting for Markdown style quotes.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Replacement</span>
|
|
|
|
Highlighting for replacements is limited to those listed in the <span style="color:#27aeae;text-decoration:underline">https://asciidoctor.org/docs/user-manual/#replacements[Asciidoctor Manual]</span> and numerical character references.
|
|
|
|
Highlighting for other <span style="color:#27aeae;text-decoration:underline">https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references[HTML/XML character references]</span> is not supported.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Examples of supported references</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#a43340">`+(C)+`</span> resulting in <span style="font-weight:bold;text-decoration:underline">(C)</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#a43340">`+=>+`</span> resulting in <span style="font-weight:bold;text-decoration:underline">=></span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#a43340">`+&#188;+`</span> resulting in <span style="font-weight:bold;text-decoration:underline">&#188;</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Examples of references that are not supported</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#a43340">`+&frac14;+`</span> resulting in &frac14;
|
|
<span style="font-weight:bold">*</span> <span style="color:#a43340">`+&phi;+`</span> resulting in &phi;
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Section</span>
|
|
|
|
<span style="font-weight:bold">*</span> Setext style for section titles.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
Only Atx style is supported.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
<span style="color:#27ae60">NOTE:</span> Asciidoctor<span style="font-weight:bold;text-decoration:underline">'</span>s <span style="color:#27aeae;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.
|
|
|
|
<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>
|
|
<span style="font-weight:bold">**</span> <span style="color:#f67400">#marked#</span>
|
|
<span style="font-weight:bold">**</span> <span style="color:#a43340">`monospaced`</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Table</span>
|
|
|
|
<span style="font-weight:bold">*</span> Highlighting of tables with custom separator.
|
|
<span style="font-weight:bold">**</span> The custom separator will <span style="font-style:italic">_not_</span> be highlighted.
|
|
<span style="font-weight:bold">**</span> All <span style="color:#a43340">`|`</span> inside the table <span style="font-style:italic">_will be falsly_</span> highlighted.
|
|
|
|
<span style="font-weight:bold">*</span> Highlighting of delimiter-separated tables.
|
|
<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.
|
|
<span style="font-weight:bold">**</span> All <span style="color:#a43340">`|`</span> inside the table <span style="font-style:italic">_will be falsly_</span> highlighted.
|
|
|
|
<span style="font-weight:bold">*</span> Applying styles on table contents.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
When defining a table, individual columns or cells can be defined to be highlighted <span style="font-weight:bold">*strong*</span> etc..
|
|
Corresponding highlighting of these cells does not work.
|
|
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Admonition</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Simple Format</span>
|
|
|
|
<span style="color:#27ae60">NOTE:</span> A simple note.
|
|
|
|
Some text.
|
|
NOTE: This is not a separate note as it is part of the paragraph started with the line above.
|
|
|
|
NOTE:This is not a note as there is no space after the <span style="color:#a43340">`:`</span>.
|
|
|
|
<span style="color:#a43340"> NOTE: This is not a note as it is indented.</span>
|
|
|
|
NOTE : This is not a note as there are spaces between <span style="color:#a43340">`NOTE`</span> and <span style="color:#a43340">`:`</span>.
|
|
|
|
NOTE:
|
|
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.
|
|
|
|
<span style="color:#27ae60">NOTE:</span> This is a lengthy note in simple format.
|
|
Second line.
|
|
One more line.
|
|
And another one.
|
|
This is the last line.
|
|
|
|
This line is not part of the simple note anymore.
|
|
|
|
<span style="color:#27ae60">CAUTION:</span> This is a CAUTION.
|
|
|
|
<span style="color:#27ae60">IMPORTANT:</span> This is IMPORTANT.
|
|
|
|
<span style="color:#27ae60">TIP:</span> This is a TIP. <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
This second line is rendered as a line on its own because of the trailing <span style="color:#a43340">`+`</span> in the first line.
|
|
|
|
<span style="color:#27ae60">WARNING:</span> This is a WARNING.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Block Format</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous</span>
|
|
<span style="color:#27ae60">[NOTE]</span>
|
|
<span style="color:#8e44ad">[[contiguous-note-id]]</span>
|
|
This is a contiguous <span style="font-weight:bold">*note*</span> block.
|
|
Second line.
|
|
And one more line.
|
|
<span style="color:#7a7c7d">// comment inside block</span>
|
|
This is the final line.
|
|
|
|
This line is not part of the contiguous note block anymore.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited</span>
|
|
<span style="color:#27ae60">[NOTE]</span>
|
|
<span style="color:#8e44ad">[[delimited-note-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">====</span>
|
|
This is a <span style="font-weight:bold">*note*</span> in block format.
|
|
As a block, the note may have a title
|
|
<span style="color:#7a7c7d">// comment inside block</span>
|
|
|
|
In block format, multiple lines, paragraphs etc. are possible.
|
|
<span style="color:#27ae60;font-weight:bold">====</span>
|
|
|
|
There is no delimited admonition block without block name.
|
|
Using <span style="color:#a43340">`====`</span> delimiter without a block name results in an example block.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Using open block</span>
|
|
<span style="color:#27ae60">[NOTE]</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
Inside the open block note.
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= </span><span style="color:#8e44ad">[[main-1]]</span><span style="color:#f44f4f;font-weight:bold">An</span><span style="color:#8e44ad">[[main-2]]</span><span style="color:#f44f4f;font-weight:bold">chor</span><span style="color:#8e44ad">[[main-3]]</span><span style="color:#f44f4f;font-weight:bold"> and Cross Reference</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== </span><span style="color:#8e44ad">[[section-1]][[section-2]]</span><span style="color:#f44f4f;font-weight:bold"> An</span><span style="color:#8e44ad">[[section-3]][[section-4]]</span><span style="color:#f44f4f;font-weight:bold">chor</span><span style="color:#8e44ad">[[section-5]]</span>
|
|
|
|
<span style="color:#8e44ad">[[isolated-anchor]]</span>
|
|
Isolated anchor.
|
|
|
|
<span style="color:#8e44ad">[[isolated-anchor-with-label,Isolated Anchor With Label]]</span>
|
|
Isolated anchor with label.
|
|
|
|
This line has an <span style="color:#8e44ad">[[inline-anchor, Inline Anchor]]</span>anchor placed inside the text.
|
|
|
|
<span style="color:#8e44ad">[#isolated-shorthand]</span>
|
|
Isolated anchor using shorthand definition.
|
|
|
|
<span style="color:#8e44ad">[#isolated-shorthand, Isolated Shorthand Anchor]</span>
|
|
Isolated anchor with label using shorthand definition.
|
|
|
|
This line has an <span style="color:#8e44ad"> [ #inline-shorthand ]#anchor placed inside the text#</span> #.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Inside </span><span style="color:#8e44ad">[[block-anchor]]</span><span style="color:#f44f4f;font-style:italic">block title</span>
|
|
Works too.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Macro form</span>
|
|
There is also a ma<span style="color:#27ae60">anchor:anchor-id[Macro Anchor]</span>cro form for anchor definition.
|
|
|
|
<span style="color:#27ae60">NOTE:</span> There is no space needed before the <span style="color:#a43340">`anchor`</span> macro name.
|
|
Also not after the closing <span style="color:#a43340">`]`</span>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Not an anchor</span>
|
|
|
|
[[ not-an-anchor]]
|
|
because of the space after the opening brackets.
|
|
|
|
[[not-an-anchor ]]
|
|
because of the space before the closing brackets.
|
|
|
|
<span style="color:#a43340"> [[not-an-anchor]] because of line starting with spaces.</span>
|
|
|
|
<span style="color:#a43340"> [#not-an-anchor]#because# of line starting with spaces.</span>
|
|
|
|
[#not-an-anchor] because of trailing text.
|
|
|
|
Not an anchor because of leading text [#not-an-anchor]
|
|
|
|
Also[<span style="color:#f67400">#not-an-anchor]#some text#</span> because of missing space before <span style="color:#a43340">`[`</span>.
|
|
|
|
Also [<span style="color:#f67400">#not-an-anchor] #some text#</span> because of space after <span style="color:#a43340">`]`</span>.
|
|
|
|
Also [<span style="color:#f67400">#not-an-anchor]#</span> some text# because of space after the leading <span style="color:#a43340">`#`</span>.
|
|
|
|
Also [<span style="color:#f67400">#not-an-anchor]because of missing referred text (e.g. `#some text#</span>`).
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Escaped</span>
|
|
|
|
This is an escaped \[[anchor-id, some <span style="color:#f67400">#anchor#</span> label]] anchor.
|
|
|
|
This is just some \normal text.
|
|
|
|
Some\[[anchor-id]]anchor.
|
|
|
|
\[[anchor-id]]
|
|
|
|
<span style="color:#7a7c7d">////</span>
|
|
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#7a7c7d">: highlighting differs</span>
|
|
<span style="color:#7a7c7d">Asciidoctor seems to just pass through the anchor when escaping it.</span>
|
|
<span style="color:#7a7c7d">This behaviour is rather unexpected, as in other cases the escaped contents is subject to further highlighting.</span>
|
|
|
|
<span style="color:#7a7c7d">We currently only consume the opening bracket.</span>
|
|
<span style="color:#7a7c7d">////</span>
|
|
This is an escaped \[<span style="color:#f67400">#shorthand-id]#anchor in shorthand form#</span>.
|
|
|
|
Some \[#shorthand-id].
|
|
|
|
\[#shorthand-id]
|
|
|
|
\[<span style="color:#f67400">#shorthand-id]#</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Cross References</span>
|
|
|
|
<span style="color:#27aeae;text-decoration:underline"><<main-1>></span>
|
|
|
|
<span style="color:#27aeae;text-decoration:underline"><<main-2>></span>
|
|
|
|
<span style="color:#27aeae;text-decoration:underline"><<main-3>></span>
|
|
|
|
<span style="color:#27aeae;text-decoration:underline"><<section-1>></span>
|
|
|
|
This is a reference to <span style="color:#27aeae;text-decoration:underline"><<section-2>></span>.
|
|
|
|
<span style="color:#27aeae;text-decoration:underline"><<section-3>></span> some text >> some more text
|
|
|
|
some << text <<span style="color:#27aeae;text-decoration:underline"><<section-4>></span>>
|
|
|
|
<span style="color:#27aeae;text-decoration:underline"><<section-5>></span>
|
|
|
|
<span style="color:#27aeae;text-decoration:underline"><<isolated-anchor>></span>
|
|
|
|
<span style="color:#27aeae;text-decoration:underline"><<isolated-anchor-with-label>></span>
|
|
|
|
<span style="color:#27aeae;text-decoration:underline"><<inline-anchor>></span>
|
|
|
|
<span style="color:#27aeae;text-decoration:underline"><<isolated-shorthand>></span>
|
|
|
|
<span style="color:#27aeae;text-decoration:underline"><<inline-shorthand>></span>.
|
|
|
|
<span style="color:#27aeae;text-decoration:underline"><<block-anchor>></span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Escaped</span>
|
|
|
|
This is not a reference \<<section-1>>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Attribute</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== No Value</span>
|
|
|
|
<span style="color:#27aeae">:some-attribute:</span>
|
|
This line should not be highlighted.
|
|
|
|
<span style="color:#a43340"> :not-an-attribute: as the line is indented.</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Single Line Value</span>
|
|
|
|
Attributes with values that are rendered as a single line, even if their definition spans multiple lines.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Single line definition</span>
|
|
<span style="color:#27aeae">:single-line: </span><span style="color:#27aeae;font-style:italic">only one line</span>
|
|
This line is not part of the attribute value anymore.
|
|
|
|
<span style="color:#f67400">##before##</span><span style="color:#27aeae">{single-line}</span><span style="color:#f67400">##after##</span>
|
|
|
|
<span style="color:#27aeae">:attr-in-attr-value: </span><span style="color:#27aeae;font-style:italic">in multi line definition</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Multi line definition</span>
|
|
<span style="color:#27aeae">:single-line-continued: </span><span style="color:#27aeae;font-style:italic">First line {attr-in-attr-value}.</span> <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">\</span>
|
|
<span style="color:#27aeae;font-style:italic">Second line.</span> <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">\</span>
|
|
<span style="color:#27aeae;font-style:italic">Another line.</span>
|
|
This line is not part of the attribute value anymore.
|
|
|
|
<span style="color:#f67400">##before##</span><span style="color:#27aeae">{single-line-continued}</span><span style="color:#f67400">##after##</span>
|
|
|
|
<span style="color:#27ae60">IMPORTANT:</span> At least one space is needed before the continuation <span style="color:#a43340">`\`</span>.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Line continuation is only highlighted when inside an attribute definition</span>
|
|
some \
|
|
text
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Multi Line Value</span>
|
|
|
|
Attributes with values including hard line breaks.
|
|
|
|
<span style="color:#27ae60">IMPORTANT:</span> At least one space is needed before the continuation <span style="color:#a43340">`+`</span> and between the <span style="color:#a43340">`+`</span> and the <span style="color:#a43340">`\`</span>.
|
|
|
|
<span style="color:#27aeae">:multi-line: </span><span style="color:#27aeae;font-style:italic">First line.</span> <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span> <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">\</span>
|
|
<span style="color:#27aeae;font-style:italic">Second line.</span> <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span> <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">\</span>
|
|
<span style="color:#27aeae;font-style:italic">Third line.</span>
|
|
This line is not part of the attribute value anymore.
|
|
|
|
<span style="color:#f67400">##before##</span><span style="color:#27aeae">{multi-line}</span><span style="color:#f67400">##after##</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Inline Definition</span>
|
|
|
|
Inline attribute definitions <span style="color:#27aeae">{set:inline-attribute:</span><span style="color:#27aeae;font-style:italic">just fine</span><span style="color:#27aeae">}</span> works <span style="color:#27aeae">{inline-attribute}</span>.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Surplus </span><span style="color:#a43340">`:`</span><span style="color:#f44f4f;font-style:italic"> is part of the value</span>
|
|
<span style="color:#27aeae">{set:attr:</span><span style="color:#27aeae;font-style:italic">:some value</span><span style="color:#27aeae">}</span>
|
|
<span style="color:#27aeae">{attr}</span>
|
|
|
|
<span style="color:#27aeae">{set:attr}</span>
|
|
<span style="color:#27aeae">{attr}</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Not an inline definition as leading </span><span style="color:#a43340">`set:`</span><span style="color:#f44f4f;font-style:italic"> is missing</span>
|
|
{single-line:some value}
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Unsetting</span>
|
|
|
|
<span style="color:#27aeae">:!_custom_2-:</span>
|
|
<span style="color:#27aeae">:_custom_2-!:</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Adding a value when unsetting doesn't make sense, but doesn't hurt either</span>
|
|
<span style="color:#27aeae">:some-attribute: </span><span style="color:#27aeae;font-style:italic">some value</span>
|
|
Attribute is set to <span style="color:#a43340">`{some-attribute}`</span>.
|
|
|
|
<span style="color:#27aeae">:!some-attribute: </span><span style="color:#27aeae;font-style:italic">some value</span>
|
|
<span style="color:#27aeae">{some-attribute}</span> is not set anymore.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Not an Attribute</span>
|
|
|
|
:not-an-attribute:as there is no space after the terminating column of the identifier
|
|
|
|
<span style="color:#a43340"> :not-an-attribute: as it is indented</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Combination with Other Highlighting</span>
|
|
|
|
<span style="color:#27ae60;font-weight:bold">****</span>
|
|
<span style="color:#27aeae">:inside-a-block: </span><span style="color:#27aeae;font-style:italic">inside a block</span>
|
|
Using an attribute <span style="color:#27aeae">{inside-a-block}</span> works too.
|
|
<span style="color:#27ae60;font-weight:bold">****</span>
|
|
|
|
<span style="color:#27aeae">:inside-formatting: </span><span style="color:#27aeae;font-style:italic">inside formatting</span>
|
|
An attribute used <span style="color:#a43340">`{inside-formatting}`</span> is not highlighting as attribute.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Escaped</span>
|
|
|
|
\:attr-1: escaped attribute definition + \
|
|
second line of escaped attribute definition
|
|
|
|
\:!attr-1: escaped unset attribute
|
|
|
|
\:-attr-1: this is not highlighted as escaped attribute definition as it has an invalid attribute id.
|
|
|
|
This \:attr-1: is not highlighted as escaped attribute definition as it is not used at line start.
|
|
|
|
<span style="color:#27aeae">:attr-1: </span><span style="color:#27aeae;font-style:italic">some attribute</span>
|
|
This is not rendered as \{attr-1}.
|
|
|
|
This is not an inline attribute definition \{set:attr-2:some other attribute}. <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
<span style="color:#27aeae">{attr-2}</span> is not set.
|
|
|
|
<span style="color:#27ae60;font-weight:bold">****</span>
|
|
<span style="color:#27aeae">:inside-a-block: </span><span style="color:#27aeae;font-style:italic">inside a block</span>
|
|
Escaping an attribute \{inside-a-block} works too.
|
|
<span style="color:#27ae60;font-weight:bold">****</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Bibliography</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Using References</span>
|
|
|
|
The first reference has no label, so its id <span style="color:#27aeae;text-decoration:underline"><<ref-1>></span> is rendered.
|
|
|
|
The second reference has number <span style="color:#27aeae;text-decoration:underline"><<r2>></span> as label.
|
|
|
|
The third reference has <span style="color:#27aeae;text-decoration:underline"><<r3>></span> as label.
|
|
|
|
A reference definition inside the text instead of the bibliography section yields some strange result: <span style="color:#8e44ad">[[[ref-o,outside bibliography]]]</span>].
|
|
Not sure what to do with this.
|
|
|
|
This is trying to use the escaped reference <span style="color:#27aeae;text-decoration:underline"><<r4>></span>.
|
|
|
|
This is trying to use reference <span style="color:#27aeae;text-decoration:underline"><<r6>></span>.
|
|
|
|
|
|
<span style="color:#27ae60">[bibliography]</span>
|
|
<span style="color:#f44f4f;font-weight:bold">== References</span>
|
|
|
|
<span style="font-weight:bold">-</span> <span style="color:#8e44ad">[[[ref-1]]]</span> This is reference 1.
|
|
<span style="font-weight:bold">-</span> <span style="color:#8e44ad">[[[r2,2]]]</span>This is reference 2.
|
|
<span style="font-weight:bold">-</span> <span style="color:#8e44ad">[[[r3,Some Text]]]</span>
|
|
This is reference 3.
|
|
<span style="font-weight:bold">-</span> [\[[r4, escaped]]] This is <span style="color:#f67400">#escaped#</span>.
|
|
<span style="font-weight:bold">-</span> <span style="color:#8e44ad">[[[r5,5]]]</span> This is reference 5.
|
|
<span style="font-weight:bold">*</span> <span style="color:#8e44ad">[[[r6,strange]]]</span> Using an asterisk yields a strange result.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Block</span>
|
|
|
|
<span style="color:#27ae60">[abstract]</span>
|
|
<span style="color:#f44f4f;font-style:italic">.Abstract - contiguous block</span>
|
|
This document is used for testing syntax highlighting regarding various types of blocks.
|
|
E.g. this contiguous abstract block. <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
Using block form for the abstract seems to be rendered differently than the section form (see <span style="color:#a43340">`section.adoc`</span>).
|
|
|
|
<span style="color:#27ae60">[abstract]</span>
|
|
<span style="color:#f44f4f;font-style:italic">.Abstract - delimited open block</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
Using the delimited block form <span style="font-weight:bold;text-decoration:underline">...</span>
|
|
|
|
enables having empty lines in the abstract.
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== General</span>
|
|
|
|
<span style="color:#27ae60">NOTE:</span> Starting and ending delimiter must be balanced, meaning they must have the same length.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Block title </span><span style="color:#f67400">#before#</span><span style="color:#f44f4f;font-style:italic"> block meta data</span>
|
|
<span style="color:#27ae60">[literal]</span>
|
|
<span style="color:#27ae60;font-weight:bold">....</span>
|
|
<span style="color:#a43340">Inside the block.</span>
|
|
<span style="color:#27ae60;font-weight:bold">....</span>
|
|
|
|
<span style="color:#27ae60">[literal]</span>
|
|
<span style="color:#f44f4f;font-style:italic">.Block title </span><span style="color:#a43340">`after`</span><span style="color:#f44f4f;font-style:italic"> block meta data</span>
|
|
<span style="color:#27ae60;font-weight:bold">....</span>
|
|
<span style="color:#a43340">Inside the block.</span>
|
|
<span style="color:#27ae60;font-weight:bold">....</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Invalid block name</span>
|
|
[ literal]
|
|
<span style="color:#27ae60;font-weight:bold">....</span>
|
|
<span style="color:#a43340">This block has invalid meta data as there is a space between the opening square bracket and the block name.</span>
|
|
<span style="color:#27ae60;font-weight:bold">....</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Block with attributes</span>
|
|
<span style="color:#27ae60">[literal, some, attributes]</span>
|
|
<span style="color:#27ae60;font-weight:bold">....</span>
|
|
<span style="color:#a43340">Inside the block.</span>
|
|
<span style="color:#27ae60;font-weight:bold">....</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Anchor before block name for contiguous block</span>
|
|
<span style="color:#8e44ad">[[contiguous_block_id_before_name]]</span>
|
|
<span style="color:#27ae60">[literal]</span>
|
|
<span style="color:#a43340">Inside the block.</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Anchor after block name for contiguous block</span>
|
|
<span style="color:#27ae60">[literal]</span>
|
|
<span style="color:#8e44ad">[[contiguous_block_id_after_name]]</span>
|
|
<span style="color:#a43340">Inside the block.</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Anchor after block name for delimited block</span>
|
|
<span style="color:#27ae60">[literal]</span>
|
|
<span style="color:#8e44ad">[#delimited_block_id]</span>
|
|
<span style="color:#27ae60;font-weight:bold">....</span>
|
|
<span style="color:#a43340">Inside the block.</span>
|
|
<span style="color:#27ae60;font-weight:bold">....</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Option definition</span>
|
|
<span style="color:#27ae60">[literal%some-option, some, attributes]</span>
|
|
<span style="color:#a43340">Inside the block.</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Shorthand anchor definition</span>
|
|
<span style="color:#7a7c7d">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#7a7c7d"> Would be nice if we could highligth the shorthand ID definition as such.</span>
|
|
<span style="color:#27ae60">[literal#shorthand-id, some, attributes]</span>
|
|
<span style="color:#a43340">Inside the block.</span>
|
|
|
|
Link to <span style="color:#27aeae;text-decoration:underline"><<contiguous_block_id_before_name>></span>.
|
|
|
|
Link to <span style="color:#27aeae;text-decoration:underline"><<contiguous_block_id_after_name>></span>.
|
|
|
|
Link to <span style="color:#27aeae;text-decoration:underline"><<shorthand-id>></span>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Admonition</span>
|
|
|
|
See <span style="color:#a43340">`admonition.adoc`</span>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Comment</span>
|
|
|
|
See <span style="color:#a43340">`comment.adoc`</span>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Example</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous</span>
|
|
<span style="color:#27ae60">[example]</span>
|
|
<span style="color:#8e44ad">[[example-block-id]]</span>
|
|
A countiguous <span style="font-weight:bold">*example*</span> block.
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
Second line of the example block.
|
|
|
|
This line is not part of the contiguous example block anymore.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited with block name</span>
|
|
<span style="color:#27ae60">[example]</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#8e44ad">[[example-block-id]]</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#27ae60;font-weight:bold">====</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
Inside the delimited example block.
|
|
<span style="color:#27ae60;font-weight:bold">====</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited without block name</span>
|
|
<span style="color:#8e44ad">[[example-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">====</span>
|
|
Inside the delimited example block.
|
|
<span style="color:#27ae60;font-weight:bold">====</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Using an open block</span>
|
|
<span style="color:#27ae60">[example]</span>
|
|
<span style="color:#8e44ad">[[example-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
Inside the open block example.
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Fenced</span>
|
|
|
|
<span style="color:#27ae60">NOTE:</span> According to the <span style="color:#27aeae;text-decoration:underline">https://asciidoctor.org/docs/user-manual/#built-in-blocks-summary[Asciidoctor manual]</span>, fenced blocks do not support block names.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited without block name</span>
|
|
<span style="color:#8e44ad">[#fenced-block-id]</span>
|
|
<span style="color:#27ae60;font-weight:bold">```</span>
|
|
<span style="color:#a43340">Inside the fenced block.</span>
|
|
<span style="color:#a43340">The block contents is rendered verbatim.</span>
|
|
<span style="color:#a43340">So there is *no* text formatting.</span>
|
|
<span style="color:#27ae60;font-weight:bold">```</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.This is not a fenced block</span>
|
|
<span style="color:#a43340">``````</span>
|
|
A fenced block<span style="font-weight:bold;text-decoration:underline">'</span>s delimiter length is <span style="font-style:italic">_exactly_</span> 3.
|
|
<span style="color:#a43340">``````</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Listing</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous</span>
|
|
<span style="color:#27ae60">[listing]</span>
|
|
<span style="color:#8e44ad">[[listing-block-id]]</span>
|
|
<span style="color:#a43340">A countiguous *listing* block.</span>
|
|
<span style="color:#a43340">Last line of the listing.</span>
|
|
|
|
This line is not part of the contiguous block anymore.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited with block name</span>
|
|
<span style="color:#27ae60">[listing]</span>
|
|
<span style="color:#8e44ad">[[listing-block-id]]</span>
|
|
<span style="color:#7a7c7d">// comment before the opening block delimiter</span>
|
|
<span style="color:#7a7c7d">////</span>
|
|
<span style="color:#7a7c7d">block comment</span>
|
|
<span style="color:#7a7c7d">////</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340">First line inside the *listing* block.</span>
|
|
<span style="color:#a43340">Last line inside the block.</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited without block name</span>
|
|
<span style="color:#8e44ad">[[listing-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340">Inside the delimited listing block.</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Using an open block</span>
|
|
<span style="color:#27ae60">[listing]</span>
|
|
<span style="color:#8e44ad">[[listing-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
<span style="color:#a43340">Inside the open block listing.</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Literal</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous</span>
|
|
<span style="color:#27ae60">[literal]</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#8e44ad">[[literal-block-id]]</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#a43340">Inside the contiguous literal block.</span>
|
|
<span style="color:#a43340">// this should not be highlighted as comment</span>
|
|
<span style="color:#a43340">.this should not be highlighted as title</span>
|
|
<span style="color:#a43340">The block contents is rendered verbatim.</span>
|
|
<span style="color:#a43340">So there is *no* text formatting.</span>
|
|
<span style="color:#a43340">// this should not be highlighted as comment</span>
|
|
|
|
This line is not part of the contiguous block anymore.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited with block name</span>
|
|
<span style="color:#27ae60">[literal]</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#8e44ad">[#literal-block-id]</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#27ae60;font-weight:bold">..........</span>
|
|
<span style="color:#a43340">Inside the delimited literal block.</span>
|
|
<span style="color:#a43340">// this should not be highlighted as comment</span>
|
|
<span style="color:#a43340">.this should not be highlighted as title</span>
|
|
<span style="color:#27ae60;font-weight:bold">..........</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited without block name</span>
|
|
<span style="color:#8e44ad">[[literal-block-id]]</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#27ae60;font-weight:bold">..........</span>
|
|
<span style="color:#a43340">Inside the delimited literal block.</span>
|
|
<span style="color:#27ae60;font-weight:bold">..........</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Using an open block</span>
|
|
<span style="color:#27ae60">[literal]</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#8e44ad">[[literal-block-id]]</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
<span style="color:#a43340">// this should not be highlighted as comment</span>
|
|
<span style="color:#a43340">Inside the open block listing.</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Using leading spaces for first line</span>
|
|
<span style="color:#a43340"> When using some leading spaces, the whole paragraph is treated as literal.</span>
|
|
<span style="color:#a43340">Only the first line needs to have leading spaces.</span>
|
|
|
|
This line is not part of the literal paragraph anymore.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Open</span>
|
|
|
|
<span style="color:#27ae60">NOTE:</span> The open block does not have a contiguous form.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited</span>
|
|
<span style="color:#8e44ad">[#open-block-id]</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
An open block<span style="font-weight:bold;text-decoration:underline">'</span>s delimiter length is <span style="font-style:italic">_exactly_</span> 2.
|
|
|
|
Last line of the <span style="color:#f67400">#open#</span> block.
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Passthrough</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous</span>
|
|
<span style="color:#27ae60">[pass]</span>
|
|
<span style="color:#8e44ad">[[contiguous-passthrough-id]]</span>
|
|
<span style="color:#da4453">Inside the contiguous passthrough block.</span>
|
|
<span style="color:#da4453">Second line to pass trhough.</span>
|
|
|
|
This line is not part of the contiguous passthrough block anymore.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited with block name</span>
|
|
<span style="color:#27ae60">[pass]</span>
|
|
<span style="color:#8e44ad">[[delimited-passthrough-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">++++++</span>
|
|
<span style="color:#da4453">Inside the delimited passthrough block with block name.</span>
|
|
<span style="color:#27ae60;font-weight:bold">++++++</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited without block name</span>
|
|
<span style="color:#8e44ad">[[delimited-passthrough-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">++++</span>
|
|
<span style="color:#da4453">Inside the delimited passthrough block without block name.</span>
|
|
<span style="color:#27ae60;font-weight:bold">++++</span>
|
|
|
|
According to the <span style="color:#27aeae;text-decoration:underline">https://asciidoctor.org/docs/user-manual/#built-in-blocks-summary[Asciidoctor Manual]</span>, passthrough using an open block is not supported.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Quote</span>
|
|
|
|
See <span style="color:#a43340">`quote_verse.adoc`</span>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Sidebar</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous</span>
|
|
<span style="color:#27ae60">[sidebar]</span>
|
|
<span style="color:#8e44ad">[[sidebar-block-id]]</span>
|
|
Inside the <span style="font-weight:bold">*sidebar*</span> block.
|
|
Second line of the sidebar block.
|
|
|
|
This line is not part of the sidbar block anymore.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited with block name</span>
|
|
<span style="color:#27ae60">[sidebar]</span>
|
|
<span style="color:#8e44ad">[[sidebar-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">**********</span>
|
|
Inside the <span style="font-weight:bold">*sidebar*</span> block.
|
|
<span style="color:#27ae60;font-weight:bold">**********</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited without block name</span>
|
|
<span style="color:#8e44ad">[[sidebar-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">****</span>
|
|
Inside the sidebar block.
|
|
<span style="color:#27ae60;font-weight:bold">****</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Using an open block</span>
|
|
<span style="color:#27ae60">[sidebar]</span>
|
|
<span style="color:#8e44ad">[[sidebar-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
Inside the sidebar block.
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Source</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous</span>
|
|
<span style="color:#27ae60">[source,ruby]</span>
|
|
<span style="color:#8e44ad">[[source-block-id]]</span>
|
|
<span style="color:#a43340">#This is Ruby source code.</span>
|
|
<span style="color:#a43340">#NOTE: If there is a space after the `#`, Asciidoctor interprets this as a section title.</span>
|
|
<span style="color:#a43340">#Seems in contiguous source blocks, Asciidoctor still interprets the block contents, which is rather unexpected.</span>
|
|
<span style="color:#a43340">import 'needed'</span>
|
|
<span style="color:#a43340">IO.puts "hello"</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous using option syntax</span>
|
|
<span style="color:#27ae60">[source%mixed,php]</span>
|
|
<span style="color:#a43340"><p></span>
|
|
<span style="color:#a43340"><?php echo "Hello, World!"; ?></span>
|
|
<span style="color:#a43340"></p></span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited with block name</span>
|
|
<span style="color:#27ae60">[source , ruby ]</span>
|
|
<span style="color:#8e44ad">[[source-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340"># This is Ruby source code.</span>
|
|
<span style="color:#a43340"># NOTE: in delimited source blocks, having a space after the `#` in the comment is OK.</span>
|
|
<span style="color:#a43340">import 'needed'</span>
|
|
|
|
<span style="color:#a43340">IO.puts "hello"</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited with block name using option syntax</span>
|
|
<span style="color:#27ae60">[source%mixed,php]</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340"><p></span>
|
|
<span style="color:#a43340"><?php echo "Hello, World!"; ?></span>
|
|
<span style="color:#a43340"></p></span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited with block name using option syntax on next line</span>
|
|
<span style="color:#27ae60">[source]</span>
|
|
<span style="color:#27ae60">[options="nowrap"]</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340"><p></span>
|
|
<span style="color:#a43340"><?php echo "Hello, World!"; ?></span>
|
|
<span style="color:#a43340"></p></span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited without block name</span>
|
|
<span style="color:#8e44ad">[[source-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340"># This is Ruby source code.</span>
|
|
<span style="color:#a43340"># NOTE: in delimited source blocks, having a space after the `#` in the comment is OK.</span>
|
|
<span style="color:#a43340">import 'needed'</span>
|
|
|
|
<span style="color:#a43340">IO.puts "hello"</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Using an open block</span>
|
|
<span style="color:#27ae60">[source,ruby]</span>
|
|
<span style="color:#8e44ad">[[source-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
<span style="color:#a43340">import 'needed'</span>
|
|
|
|
<span style="color:#a43340">IO.puts "hello"</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Stem</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous</span>
|
|
<span style="color:#27ae60">[stem]</span>
|
|
<span style="color:#8e44ad">[[stem-block-id]]</span>
|
|
<span style="color:#da4453">Inside the contiguous stem block.</span>
|
|
<span style="color:#da4453">Second line to pass.</span>
|
|
|
|
This line is not part of the contiguous Passthrough block anymore.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited with block name</span>
|
|
<span style="color:#27ae60">[stem]</span>
|
|
<span style="color:#8e44ad">[[stem-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">++++++</span>
|
|
<span style="color:#da4453">Inside the delimited stem block with block name.</span>
|
|
<span style="color:#27ae60;font-weight:bold">++++++</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited without block name</span>
|
|
<span style="color:#8e44ad">[[stem-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">++++</span>
|
|
<span style="color:#da4453">Inside the delimited stem block without block name.</span>
|
|
<span style="color:#27ae60;font-weight:bold">++++</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Table</span>
|
|
|
|
See <span style="color:#a43340">`table.adoc`</span>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Verse</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous</span>
|
|
<span style="color:#27ae60">[verse]</span>
|
|
<span style="color:#8e44ad">[[verse-block-id]]</span>
|
|
Inside the <span style="font-weight:bold">*verse*</span> block.
|
|
Second line of the verse block.
|
|
|
|
This line is not part of the contiguous verse block anymore.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited with block name</span>
|
|
<span style="color:#27ae60">[verse]</span>
|
|
<span style="color:#8e44ad">[[verse-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">____</span>
|
|
Inside the <span style="font-weight:bold">*verse*</span> block.
|
|
<span style="color:#27ae60;font-weight:bold">____</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited without block name</span>
|
|
This would be rendered as a quote block as the same delimiters are used.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Using an open block</span>
|
|
<span style="color:#27ae60">[verse]</span>
|
|
<span style="color:#8e44ad">[[verse-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
Inside the <span style="font-weight:bold">*verse*</span> block.
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Nested Blocks</span>
|
|
|
|
<span style="color:#27ae60;font-weight:bold">====</span>
|
|
Start of outer example block.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Nested example block</span>
|
|
<span style="color:#27ae60;font-weight:bold">=====</span>
|
|
Inside the inner example block.
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Nested literal block</span>
|
|
<span style="color:#27ae60">[literal]</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340">Inside the literal block within the inner example block.</span>
|
|
<span style="color:#a43340">--</span>
|
|
<span style="color:#a43340">Trying to use a block within a verbatim block results in verbatim text, of course.</span>
|
|
<span style="color:#a43340">--</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#27ae60;font-weight:bold">=====</span>
|
|
Line in outer block.
|
|
<span style="color:#27ae60">[listing]</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340">Inside the inner listing block.</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
End of outer block.
|
|
<span style="color:#27ae60;font-weight:bold">====</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Admonition inside some other block</span>
|
|
<span style="color:#27ae60;font-weight:bold">====</span>
|
|
Some text.
|
|
|
|
<span style="color:#27ae60">NOTE:</span> This is a note in simple format inside a block.
|
|
|
|
Some more text.
|
|
<span style="color:#27ae60;font-weight:bold">====</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Callout</span>
|
|
<span style="color:#7a7c7d">// Add `:icons: font` for nice callout icons.</span>
|
|
|
|
Callouts are usually used with listing/source blocks, but Asciidoctor renders them also without a listing block.
|
|
|
|
<span style="font-weight:bold;text-decoration:underline"><1></span> This is a callout.
|
|
<span style="font-weight:bold;text-decoration:underline"><.></span> This is a callout too.
|
|
|
|
<span style="color:#a43340"> <2> This is not rendered as a callout as it is indented.</span>
|
|
|
|
The line below is not rendered as a callout as it has no text in the same line.
|
|
|
|
<3>
|
|
|
|
The line below is not rendered as callout as it is part of this paragraph.
|
|
<4> This should <span style="font-style:italic">_not_</span> be highlighted as callout.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Callouts with manual numbering</span>
|
|
<span style="color:#27ae60">[source,sh]</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340">ls -l <2></span>
|
|
<span style="color:#a43340">ls -la <1></span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="font-weight:bold;text-decoration:underline"><1></span> Explanation for callout number 1.
|
|
<span style="font-weight:bold;text-decoration:underline"><2></span> Explanation for callout number 2.
|
|
\<3> This is not a callout as it is escaped.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Callouts with automatic numbering</span>
|
|
<span style="color:#27ae60">[source,sh]</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340">ls -l <.></span>
|
|
<span style="color:#a43340">ls -la <.></span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="font-weight:bold;text-decoration:underline"><.></span> Explanation for callout number 1.
|
|
<span style="font-weight:bold;text-decoration:underline"><.></span> Explanation for callout number 2.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Comment</span>
|
|
|
|
<span style="color:#27ae60">TIP:</span> Comment highlighting supports the standard <span style="color:#27aeae;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.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Single Line</span>
|
|
|
|
Single-line comments start with exactly <span style="color:#a43340">`//`</span>.
|
|
If there are any characters - including spaces - before the <span style="color:#a43340">`//`</span>, the line will be rendered.
|
|
If there are more than two consecutive <span style="color:#a43340">`/`</span>, the line will be rendered.
|
|
|
|
This line // will be rendered completely.
|
|
|
|
<span style="color:#a43340"> // This line will be rendered as verbatim text as it is indented.</span>
|
|
|
|
/// This line will be rendered as it starts with 3 <span style="color:#a43340">`/`</span>.
|
|
|
|
<span style="color:#7a7c7d">// This line will be invisible.</span>
|
|
|
|
<span style="color:#7a7c7d">//This line will be invisible.</span>
|
|
|
|
<span style="color:#7a7c7d">//</span>
|
|
|
|
\// Escaped comment.
|
|
|
|
\// TODO Of course there is no alert highlighting in escaped comments.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Alerts</span>
|
|
<span style="color:#7a7c7d">// </span><span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">NOTE</span><span style="color:#7a7c7d"> testing alerts</span>
|
|
<span style="color:#7a7c7d">// </span><span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">TEST</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#7a7c7d">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#7a7c7d">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TASK</span><span style="color:#7a7c7d"> testing alerts</span>
|
|
<span style="color:#7a7c7d">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">WARNING</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#7a7c7d">// </span><span style="color:#e85848;background-color:#451e1a;font-weight:bold">ALERT</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#7a7c7d">// </span><span style="color:#e85848;background-color:#451e1a;font-weight:bold">DANGER</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Multi Line</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous block</span>
|
|
<span style="color:#27ae60">[comment]</span>
|
|
<span style="color:#7a7c7d">Some comment.</span>
|
|
<span style="color:#7a7c7d">Alerts:</span>
|
|
<span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">NOTE</span><span style="color:#7a7c7d"> testing alerts</span>
|
|
<span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">TEST</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TASK</span><span style="color:#7a7c7d"> testing alerts</span>
|
|
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">WARNING</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#e85848;background-color:#451e1a;font-weight:bold">ALERT</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#e85848;background-color:#451e1a;font-weight:bold">DANGER</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#7a7c7d">Last line of contiguous block comment.</span>
|
|
|
|
This line is not part of the contiguous block comment anymore.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited block without name</span>
|
|
<span style="color:#7a7c7d">//////</span>
|
|
<span style="color:#7a7c7d">This is a multi-line comment.</span>
|
|
<span style="color:#7a7c7d">It spans multiple lines.</span>
|
|
|
|
<span style="color:#7a7c7d">Alerts:</span>
|
|
<span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">NOTE</span><span style="color:#7a7c7d"> testing alerts</span>
|
|
<span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">TEST</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TASK</span><span style="color:#7a7c7d"> testing alerts</span>
|
|
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">WARNING</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#e85848;background-color:#451e1a;font-weight:bold">ALERT</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#e85848;background-color:#451e1a;font-weight:bold">DANGER</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
|
|
<span style="color:#7a7c7d">This is the comment's last line.</span>
|
|
<span style="color:#7a7c7d">//////</span>
|
|
|
|
<span style="color:#27ae60">[comment]</span>
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited block with name</span>
|
|
<span style="color:#7a7c7d">////</span>
|
|
<span style="color:#7a7c7d">This is a multi-line comment.</span>
|
|
<span style="color:#7a7c7d">It spans multiple lines.</span>
|
|
|
|
<span style="color:#7a7c7d">Alerts:</span>
|
|
<span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">NOTE</span><span style="color:#7a7c7d"> testing alerts</span>
|
|
<span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold">TEST</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TASK</span><span style="color:#7a7c7d"> testing alerts</span>
|
|
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">WARNING</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#e85848;background-color:#451e1a;font-weight:bold">ALERT</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
<span style="color:#e85848;background-color:#451e1a;font-weight:bold">DANGER</span><span style="color:#7a7c7d">: testing alerts</span>
|
|
|
|
<span style="color:#7a7c7d">This is the comment's last line.</span>
|
|
<span style="color:#7a7c7d">////</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Using open block</span>
|
|
<span style="color:#27ae60">[comment]</span>
|
|
<span style="color:#7a7c7d">--</span>
|
|
<span style="color:#7a7c7d">Inside the open block comment.</span>
|
|
<span style="color:#7a7c7d">--</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Counter</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Use and Render</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Start with 1 and render value</span>
|
|
New value for <span style="color:#a43340">`c1`</span> is <span style="color:#27aeae">{counter:c1}</span>.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Increment and render</span>
|
|
And now it is <span style="color:#27aeae">{counter:c1}</span>.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Render the current value without changing it</span>
|
|
Current value is <span style="color:#27aeae">{c1}</span>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Use Without Rendering</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Define the new counter</span>
|
|
No new value to be <span style="color:#27aeae">{counter2:c2}</span>seen.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Let's see the current value</span>
|
|
Current value is <span style="color:#27aeae">{c2}</span>.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Increment</span>
|
|
No incremented value to be <span style="color:#27aeae">{counter2:c2}</span>seen.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Let's see the current value</span>
|
|
Current value is <span style="color:#27aeae">{c2}</span>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Using a Start Value</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Start with 3 and render value</span>
|
|
New value for <span style="color:#a43340">`c3`</span> is <span style="color:#27aeae">{counter:c3:99}</span>.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Increment and render</span>
|
|
And now it is <span style="color:#27aeae">{counter:c3}</span>.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Works with characters too</span>
|
|
New value for <span style="color:#a43340">`c4`</span> is <span style="color:#27aeae">{counter:c4:X}</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Increment character counter and render</span>
|
|
And now it is <span style="color:#27aeae">{counter:c4}</span>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== About using Spaces</span>
|
|
|
|
<span style="color:#27ae60">CAUTION:</span> If you leave spaces after the <span style="color:#a43340">`:`</span> or before the closing <span style="color:#a43340">`}`</span>, Asciidoctor will make them part of the counter attribute name. <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
So it<span style="font-weight:bold;text-decoration:underline">'</span>s probably wise to avoid spaces here.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Define a counter</span>
|
|
New value is <span style="color:#27aeae">{counter:c5}</span>.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.This is actually a new counter</span>
|
|
New value is <span style="color:#27aeae">{counter: c5}</span>.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.But you can't access that attribute</span>
|
|
Can<span style="font-weight:bold;text-decoration:underline">'</span>t just show the current value { c5}
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Only if we increment it</span>
|
|
Incremented value is <span style="color:#27aeae">{counter: c5}</span>.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.This is again a new counter</span>
|
|
New value is <span style="color:#27aeae">{counter: c5}</span>.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.This is also a new counter</span>
|
|
New value is <span style="color:#27aeae">{counter:c5 }</span>.
|
|
|
|
<span style="color:#27ae60">CAUTION:</span> Similar problems occur when using spaces around starting values. <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
<span style="font-weight:bold">*Just don't use spaces*</span>.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.New counter with start value</span>
|
|
New value is <span style="color:#27aeae">{counter:c6: 9 }</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.But when trying to increment</span>
|
|
Incremented value is <span style="color:#27aeae">{counter:c6}</span>
|
|
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Text Formatting</span>
|
|
|
|
<span style="color:#27ae60">TIP:</span> Asciidoctor uses also the term <span style="font-style:italic">_quoted text_</span>.
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Custom Styles</span>
|
|
|
|
<span style="color:#27ae60">[big]#big text#</span>
|
|
|
|
Some <span style="color:#27ae60">[.big]#big text#</span>.
|
|
|
|
Some <span style="color:#27ae60">[big]#big and *strong* text#</span>.
|
|
|
|
Some text with <span style="color:#27ae60">[foo]#custom style#</span>.
|
|
|
|
<span style="color:#27ae60">[foo bar]#foo bar text#</span>
|
|
|
|
before!<span style="color:#27ae60">[big]#big text#</span>
|
|
|
|
<span style="color:#27ae60">[big]#big text#</span>!after
|
|
|
|
<span style="color:#27ae60">[big]##*text*##</span>
|
|
|
|
<span style="color:#7a7c7d">////</span>
|
|
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#7a7c7d"> Highlighting differs.</span>
|
|
<span style="color:#7a7c7d">The phrase is rendered as marked.</span>
|
|
<span style="color:#7a7c7d">The trailing hash is therefore not visible.</span>
|
|
<span style="color:#7a7c7d">////</span>
|
|
<span style="color:#27ae60">[big]###text##</span>#
|
|
|
|
<span style="color:#27ae60">[fo[o]#some text#</span>
|
|
|
|
|
|
<span style="color:#27ae60">[underline]_emphasized and underlined_</span>
|
|
|
|
<span style="color:#27ae60">[underline]__emphasized and underlined_</span>
|
|
|
|
|
|
<span style="color:#27ae60">[underline]`monospaced and underlined`</span>
|
|
|
|
<span style="color:#27ae60">[underline]``monospaced and underlined``</span>
|
|
|
|
|
|
<span style="color:#27ae60">[underline]*strong and underlined*</span>
|
|
|
|
<span style="color:#27ae60">[underline]**strong and underlined**</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Not rendered as custom style</span>
|
|
|
|
[fo]o]<span style="color:#f67400">#not a custom style#</span> because of surplus <span style="color:#a43340">`]`</span>.
|
|
|
|
[big]not a phrase because of missing phrase markers.
|
|
|
|
[big]# # because only spaces used as phrase.
|
|
|
|
[big]# the phrase# because of leading space in phrase.
|
|
|
|
[big]#the phrase # because of trailing space in phrase.
|
|
|
|
Before[foo]<span style="color:#f67400">#the phrase#</span> because of missing non-word character before clause.
|
|
|
|
Before [foo]#the phrase#after because of missing non-word character after clause.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Escaped</span>
|
|
|
|
This is not \[underline]<span style="color:#f67400">#underlined text#</span>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Emphasized</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered formatted</span>
|
|
|
|
This line contains a <span style="font-style:italic">_sequence_</span> of <span style="font-style:italic">_multiple emphasized_</span> words.
|
|
|
|
This line contains a single <span style="font-style:italic">_emphasized_</span> word.
|
|
|
|
This line contains a single <span style="font-style:italic">__emphasized_</span> word.
|
|
|
|
This line contains a single <span style="font-style:italic">_emphasized__</span> word.
|
|
|
|
The text within the brackets should be (<span style="font-style:italic">_emphasized_</span>), but the brackets themselves not.
|
|
|
|
(<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>?
|
|
|
|
<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>( <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">__aa__</span>bb
|
|
|
|
aa<span style="font-style:italic">__bb__</span>
|
|
|
|
aa<span style="font-style:italic">__bb _cc__</span>dd
|
|
|
|
aa<span style="font-style:italic">__bb cc__</span>_dd
|
|
|
|
aa<span style="font-style:italic">__ bb __</span>cc
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered as-is</span>
|
|
|
|
This line does not contain _some emphasized _ text as there is a surplus space.
|
|
|
|
This line does not contain_some emphasized_ text as there is a space missing.
|
|
|
|
This line does not contain _some emphasized_text as there is a space missing.
|
|
|
|
foo ;_emphasized_ :_emphasized_ }_emphasized_
|
|
|
|
;_emphasized_
|
|
:_emphasized_
|
|
}_emphasized_
|
|
|
|
<span style="color:#7a7c7d">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#7a7c7d"> Highlighting differs.</span>
|
|
In this line, there is some <span style="font-style:italic">___very emphasized___</span> text.
|
|
Asciidoctor renders it as normal text, just ignoring all the underscores.
|
|
That is a bit strange.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Escaped</span>
|
|
|
|
Not \_emphasized_ as it is escaped.
|
|
|
|
Still \_<span style="font-style:italic">_emphasized__</span> as only the outermost level is escaped.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Marked</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered formatted</span>
|
|
|
|
Some # marked # text.
|
|
|
|
Works <span style="color:#f67400">#also for multiple words#</span>.
|
|
|
|
Some <span style="color:#f67400">##marked#</span> text.
|
|
|
|
Some <span style="color:#f67400">#marked#</span># text.
|
|
|
|
Some <span style="color:#f67400">##marked##</span> text.
|
|
|
|
Some[big]<span style="color:#f67400">#marked#</span> text.
|
|
Not rendered big but marked, because of missing space before <span style="color:#a43340">`[big]`</span>.
|
|
|
|
Works also for p<span style="color:#f67400">##art##</span>s of a word.
|
|
|
|
p#<span style="color:#f67400">#art#</span>!s
|
|
|
|
!<span style="color:#f67400">#marked#</span>!
|
|
|
|
<span style="color:#f67400">#marked#</span>
|
|
|
|
<span style="color:#f67400">##marked##</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered as-is</span>
|
|
|
|
Not rendered # marked# because of space after the leading hash.
|
|
|
|
Not rendered #marked # because of space before the trailing hash.
|
|
|
|
Not rendered#marked# as there is a space missing.
|
|
|
|
Not rendered #marked#as there is a space missing.
|
|
|
|
<span style="color:#a43340"> This is #rendered# as a verbatim block as it is indented.</span>
|
|
|
|
Some <span style="color:#27ae60">[big]#big marked#</span> text.
|
|
|
|
Some <span style="color:#27ae60">[big]##big marked##</span> text.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Escaped</span>
|
|
|
|
Not \#marked# as it is escaped.
|
|
|
|
Still \#<span style="color:#f67400">#marked#</span># as only the outermost level is escaped.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Monospaced</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered formatted</span>
|
|
|
|
This line contains a <span style="color:#a43340">`sequence of ` multiple monospaced`</span> words.
|
|
|
|
This line contains a single <span style="color:#a43340">`monospaced`</span> word.
|
|
|
|
This line contains a single <span style="color:#a43340">``monospaced`</span> word.
|
|
|
|
This line contains a single <span style="color:#a43340">`monospaced`</span>` word.
|
|
|
|
The text within the brackets should be (<span style="color:#a43340">`monospaced`</span>), but the brackets themselves not.
|
|
|
|
before<span style="color:#a43340">``monospaced``</span>after.
|
|
|
|
<span style="color:#a43340">`monospaced`</span>
|
|
|
|
(<span style="color:#a43340">`mono`</span> [<span style="color:#a43340">`mono`</span> {<span style="color:#a43340">`mono`</span> |<span style="color:#a43340">`mono`</span> .<span style="color:#a43340">`mono`</span> ,<span style="color:#a43340">`mono`</span> !<span style="color:#a43340">`mono`</span> ?<span style="color:#a43340">`mono`</span>
|
|
|
|
<span style="color:#a43340">`mono`</span>) <span style="color:#a43340">`mono`</span>) <span style="color:#a43340">`mono`</span>] <span style="color:#a43340">`mono`</span>} <span style="color:#a43340">`mono`</span>| <span style="color:#a43340">`mono`</span>. <span style="color:#a43340">`mono`</span>; <span style="color:#a43340">`mono`</span>, <span style="color:#a43340">`mono`</span>?
|
|
|
|
<span style="color:#a43340">`mono`</span>( <span style="color:#a43340">`mono`</span>( <span style="color:#a43340">`mono`</span>[ <span style="color:#a43340">`mono`</span>{
|
|
|
|
<span style="color:#a43340">``aa``</span>bb
|
|
|
|
aa<span style="color:#a43340">``bb``</span>
|
|
|
|
aa<span style="color:#a43340">``bb `cc``</span>dd
|
|
|
|
aa<span style="color:#a43340">``bb cc``</span>`dd
|
|
|
|
aa<span style="color:#a43340">`` bb ``</span>cc
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered as-is</span>
|
|
|
|
Not rendered ` monospaced` because of leading space.
|
|
|
|
Not rendered `monospaced ` because of trailing space.
|
|
|
|
Not rendered`monospaced` as there is a space missing.
|
|
|
|
Not rendered `monospaced`as there is a space missing.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Escaped</span>
|
|
|
|
Not \`monospaced` as it is escaped.
|
|
|
|
Still \`<span style="color:#a43340">`monospaced`</span>` as only the outermost level is escaped.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Passthrough</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered passed through</span>
|
|
|
|
This text is <span style="color:#da4453">+passed _as_ is+</span> with no further formatting.
|
|
|
|
Matching <span style="color:#da4453">+is _lazy_+</span>, so this + is rendered.
|
|
|
|
This <span style="color:#da4453">+_is_ passthrough`+</span>` as passthrough has higher priority as monospaced.
|
|
|
|
<span style="color:#da4453">+passthrough+</span> at line start.
|
|
|
|
Passthrough at <span style="color:#da4453">+line end.+</span>
|
|
|
|
Minimal passthrough <span style="color:#da4453">+a+</span>.
|
|
|
|
|
|
This text is <span style="color:#da4453">++passed _as_ is++</span> with no further formatting.
|
|
|
|
This text is <span style="color:#da4453">+++passed _as_ is+++</span> with no further formatting.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered as-is</span>
|
|
|
|
No+passthrough+ as there is no space before the leading <span style="color:#a43340">`+`</span>.
|
|
|
|
No +passthrough+as there is no space after the trailing plus.
|
|
|
|
No + passthrough+ as there is a space after the leading <span style="color:#a43340">`+`</span>.
|
|
|
|
No +passthrough + as there is a space after the trailing plus.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Escaped</span>
|
|
|
|
This text \+is <span style="font-style:italic">_not_</span> passed through+ because of escaping.
|
|
|
|
This text \+<span style="color:#da4453">+is _still_ passed through+</span>+ as only the outermost level is escaped.
|
|
|
|
This text \+<span style="color:#da4453">++is _still_ passed through++</span>+ as only the outermost level is escaped.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Strong</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered formatted</span>
|
|
|
|
This line contains a <span style="font-weight:bold">*sequence of * multiple strong*</span> words.
|
|
|
|
This line contains a single <span style="font-weight:bold">**strong*</span> word.
|
|
|
|
This line contains a single*<span style="font-weight:bold">*strong*</span> word.
|
|
|
|
This line contains a single <span style="font-weight:bold">*strong*</span>* word.
|
|
|
|
The text within the brackets should be (<span style="font-weight:bold">*strong*</span>), but the brackets themselves not.
|
|
|
|
(<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>
|
|
|
|
<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>?
|
|
|
|
<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>
|
|
|
|
aa<span style="font-weight:bold">**bb**</span>
|
|
|
|
<span style="font-weight:bold">**aa**</span>bb
|
|
|
|
aa<span style="font-weight:bold">**bb**</span>cc
|
|
|
|
aa<span style="font-weight:bold">**bb *cc**</span>dd
|
|
|
|
aa<span style="font-weight:bold">**bb cc**</span>*dd
|
|
|
|
aa<span style="font-weight:bold">** bb **</span>cc
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered as-is</span>
|
|
|
|
This line does <span style="font-style:italic">_not_</span> contain *some strong * text as there is a space before the trailing asterisk.
|
|
|
|
This line does <span style="font-style:italic">_not_</span> contain*some strong* text as there is a space missing before the leading asterisk.
|
|
|
|
This line does <span style="font-style:italic">_not_</span> contain *some strong*text as there is a space missing after the trailing asterisk.
|
|
|
|
some text ;*strong* :*strong* _*strong* }*strong*
|
|
|
|
some text <span style="font-style:italic">_*strong*_</span>
|
|
|
|
;*strong*
|
|
:*strong*
|
|
}*strong*
|
|
|
|
<span style="color:#a43340"> Not *strong* as there is a leading space in the line, making it verbatim.</span>
|
|
|
|
<span style="color:#7a7c7d">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#7a7c7d"> Highlighting differs.</span>
|
|
In this line, there is some <span style="font-weight:bold">***very strong*</span>** text.
|
|
It is rendered just ignoring the asterisks.
|
|
That is a bit strange.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Escaped</span>
|
|
|
|
Not \*strong* as it is escaped.
|
|
|
|
Still \*<span style="font-weight:bold">*strong*</span>* as only the outermost level is escaped.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Subscript</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered formatted</span>
|
|
|
|
H<span style="text-decoration:underline">~2~</span>O
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered as-is</span>
|
|
|
|
Not rendered sub~sc ript~ as there is a space within.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Escaped</span>
|
|
|
|
Not \~subscript~ as it is escaped.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Superscript</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered formatted</span>
|
|
|
|
E = m c<span style="font-weight:bold;text-decoration:underline">^2^</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered as-is</span>
|
|
|
|
Not rendered super^sc ript^ as there is a space within.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Escaped</span>
|
|
|
|
Not \^superscript^ as it is escaped.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Combinations</span>
|
|
|
|
<span style="color:#27ae60">IMPORTANT:</span> Combinations are supported by Asciidoctor, as long as the markup sets are entered in the right order.
|
|
The monospace markup must be the outermost set, then the strong set, and the emphasized markup must always be the innermost set.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered formatted</span>
|
|
|
|
This is <span style="font-weight:bold;font-style:italic">*_strong emphasized_*</span> text.
|
|
|
|
This is <span style="font-weight:bold;font-style:italic">*__strong _ * emphasized_*</span> text.
|
|
|
|
This is<span style="font-weight:bold;font-style:italic">**_strong emphasized_**</span>text.
|
|
|
|
This is<span style="font-weight:bold;font-style:italic">**__ strong emphasized_**</span>text.
|
|
|
|
<span style="font-weight:bold;font-style:italic">*_strong emphasized_*</span>
|
|
|
|
|
|
This is <span style="color:#a43340;font-weight:bold">`*strong monospaced*`</span> text.
|
|
|
|
This is <span style="color:#a43340;font-weight:bold">`**strong ` * monospaced*`</span> text.
|
|
|
|
This is<span style="color:#a43340;font-weight:bold">``*strong monospaced*``</span>text.
|
|
|
|
This is<span style="color:#a43340;font-weight:bold">``** strong monospaced*``</span>text.
|
|
|
|
<span style="color:#a43340;font-weight:bold">`*strong monospaced*`</span>
|
|
|
|
|
|
This is <span style="color:#a43340;font-style:italic">`_emphasized monospaced_`</span> text.
|
|
|
|
This is <span style="color:#a43340;font-style:italic">`__emphasized ` _ monospaced_`</span> text.
|
|
|
|
This is<span style="color:#a43340;font-style:italic">``_emphasized monospaced_``</span>text.
|
|
|
|
This is<span style="color:#a43340;font-style:italic">``__ emphasized monospaced_``</span>text.
|
|
|
|
<span style="color:#a43340;font-style:italic">`_emphasized monospaced_`</span>
|
|
|
|
|
|
This is <span style="color:#a43340;font-weight:bold;font-style:italic">`*_strong emphasized monospaced_*`</span> text.
|
|
|
|
This is <span style="color:#a43340;font-weight:bold;font-style:italic">`*__strong emphasized * ` _ monospaced_*`</span> text.
|
|
|
|
This is<span style="color:#a43340;font-weight:bold;font-style:italic">``*_strong emphasized monospaced_*``</span>text.
|
|
|
|
This is<span style="color:#a43340;font-weight:bold;font-style:italic">``*__ strong emphasized monospaced_*``</span>text.
|
|
|
|
<span style="color:#a43340;font-weight:bold;font-style:italic">`*_strong emphasized monospaced_*`</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Unsupported</span>
|
|
|
|
Highlighting for other combinations is currently not supported, as there would be a large number of rules and styles necessary.
|
|
|
|
<span style="font-weight:bold">*</span> <span style="font-style:italic">_emphasized #marked#_</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#f67400">#marked *strong*#</span>
|
|
<span style="font-weight:bold">*</span> <span style="font-weight:bold">*strong #marked#*</span>
|
|
<span style="font-weight:bold">*</span> <span style="font-weight:bold">*strong _emphasized #marked#_*</span>
|
|
|
|
<span style="font-weight:bold">*</span> subscript <span style="font-style:italic">_with~in~ emphasized_</span>
|
|
<span style="font-weight:bold">*</span> subscript within marked: <span style="color:#f67400">#H~2~O#</span>
|
|
<span style="font-weight:bold">*</span> subscript <span style="color:#a43340">`with~in~ monospaced`</span>
|
|
<span style="font-weight:bold">*</span> subscript <span style="font-weight:bold">*with~in~ strong*</span>
|
|
|
|
<span style="font-weight:bold">*</span> superscript <span style="font-style:italic">_with^in^ emphasized_</span>
|
|
<span style="font-weight:bold">*</span> superscript within marked: <span style="color:#f67400">#E = m c^2^#</span>
|
|
<span style="font-weight:bold">*</span> superscript <span style="color:#a43340">`with^in^ monospaced`</span>
|
|
<span style="font-weight:bold">*</span> superscript <span style="font-weight:bold">*with^in^ strong*</span>
|
|
|
|
And even more complex ones.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Rendered as-is</span>
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Escaped</span>
|
|
|
|
This is not rendered \`<span style="font-style:italic">_emphasized monospaced_</span>`. <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
But it is rendered emphasized.
|
|
|
|
This is not rendered \*<span style="font-style:italic">_emphasized strong_</span>*. <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
But it is rendered emphasized.
|
|
|
|
This is not rendered \`<span style="font-weight:bold">*monospaced strong*</span>`. <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
But it is rendered strong.
|
|
|
|
This is not rendered \`<span style="font-weight:bold;font-style:italic">*_emphasized monospaced strong_*</span>`. <span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
But it is rendered emphasized strong.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Horizontal Rules</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Simple patterns</span>
|
|
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">'''</span>
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">---</span>
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">***</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Patterns with spaces</span>
|
|
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">- - -</span>
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">* * *</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Not a horizontal rule</span>
|
|
' ' '
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Arbitrary length</span>
|
|
|
|
<span style="color:#27ae60">NOTE:</span> Although the <span style="color:#27aeae;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.
|
|
|
|
'''''''
|
|
|
|
<span style="color:#7a7c7d">////</span>
|
|
<span style="color:#7a7c7d">These patterns don't work, as they start delimited blocks, item lists etc..</span>
|
|
<span style="color:#7a7c7d">--------</span>
|
|
<span style="color:#7a7c7d">******</span>
|
|
<span style="color:#7a7c7d">- - - - - -</span>
|
|
<span style="color:#7a7c7d">* * * * * * * * * </span>
|
|
<span style="color:#7a7c7d">////</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Inside blocks</span>
|
|
|
|
<span style="color:#27ae60;font-weight:bold">****</span>
|
|
Horizontal rules work also inside blocks.
|
|
They eventually need an empty line before them, though.
|
|
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">'''</span>
|
|
After the horizontal rule.
|
|
<span style="color:#27ae60;font-weight:bold">****</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Include</span>
|
|
<span style="color:#27aeae">:includedir: </span><span style="color:#27aeae;font-style:italic">include</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Included Contents Rendered</span>
|
|
|
|
<span style="color:#27ae60">IMPORTANT:</span> The include directive is <span style="font-style:italic">_always_</span> processed, even within passthrough blocks.
|
|
|
|
<span style="color:#27ae60">NOTE:</span> Using file names with spaces works.
|
|
|
|
<span style="color:#27ae60">include::{includedir}/demo.adoc[]</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Partial include</span>
|
|
<span style="color:#27ae60">include::{includedir}/demo.adoc[lines=2..3]</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Inside contiguous block</span>
|
|
<span style="color:#27ae60">[literal]</span>
|
|
<span style="color:#a43340">This line shall be highlighted as verbatim.</span>
|
|
<span style="color:#27ae60">include::{includedir}/demo.adoc[lines=2..3]</span>
|
|
<span style="color:#a43340">This line shall be highlighted as verbatim.</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Inside delimited block with name</span>
|
|
<span style="color:#27ae60">[literal]</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
<span style="color:#a43340">This line shall be highlighted as verbatim.</span>
|
|
<span style="color:#27ae60">include::{includedir}/demo.adoc[lines=2..3]</span>
|
|
<span style="color:#a43340">This line shall be highlighted as verbatim.</span>
|
|
<span style="color:#27ae60;font-weight:bold">----</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Inside delimited block without name</span>
|
|
<span style="color:#27ae60;font-weight:bold">....</span>
|
|
<span style="color:#a43340">This line shall be highlighted as verbatim.</span>
|
|
<span style="color:#27ae60">include::{includedir}/demo.adoc[lines=2..3]</span>
|
|
<span style="color:#a43340">This line shall be highlighted as verbatim.</span>
|
|
<span style="color:#27ae60;font-weight:bold">....</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.It is also processed within passthrough blocks</span>
|
|
<span style="color:#27ae60">[pass]</span>
|
|
<span style="color:#da4453">This line shall be highlighted as passthrough.</span>
|
|
<span style="color:#27ae60">include::{includedir}/demo.adoc[lines=2..3]</span>
|
|
<span style="color:#da4453">This line shall be highlighted as passthrough.</span>
|
|
|
|
<span style="color:#27ae60">[pass]</span>
|
|
<span style="color:#da4453">--</span>
|
|
<span style="color:#da4453">This line shall be highlighted as passthrough.</span>
|
|
<span style="color:#27ae60">include::{includedir}/demo.adoc[lines=2..3]</span>
|
|
<span style="color:#da4453">This line shall be highlighted as passthrough.</span>
|
|
<span style="color:#da4453">--</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Inside table</span>
|
|
<span style="color:#27ae60;font-weight:bold">|===</span>
|
|
<span style="color:#27ae60;font-weight:bold">|</span>row 1 col 1<span style="color:#27ae60;font-weight:bold">|</span>row 2 col 2
|
|
<span style="color:#27ae60;font-weight:bold">|</span>
|
|
<span style="color:#7a7c7d">// the include directive must have its own line with nothing else</span>
|
|
<span style="color:#27ae60">include::{includedir}/demo.adoc[lines=1..1]</span>
|
|
<span style="color:#27ae60;font-weight:bold">|</span>row 2 col2
|
|
|
|
<span style="color:#27ae60;font-weight:bold">|</span>row 3 col 1
|
|
<span style="color:#27ae60;font-weight:bold">|</span>row 3 col 2
|
|
<span style="color:#27ae60;font-weight:bold">|===</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Index</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Rendered as Index Term</span>
|
|
|
|
This is a <span style="color:#27ae60">((flow))</span> index term.
|
|
|
|
This is a <span style="color:#27ae60">indexterm2:[flow]</span> index term.
|
|
|
|
This is a <span style="color:#27ae60">(((concealed, index, term)))</span> concealed index term.
|
|
|
|
This is a <span style="color:#27ae60">indexterm:[concealed, index, term]</span> concealed index term.
|
|
|
|
This is rendered as a <span style="color:#27ae60">((flow index term))</span>).
|
|
|
|
This is rendered as a <span style="color:#27ae60">(((flow index term))</span>.
|
|
|
|
This is <span style="color:#27ae60">((())</span>) empty but rendered as index term nevertheless.
|
|
|
|
Some <span style="color:#27ae60">(((index term)))</span>.
|
|
|
|
Some <span style="color:#27ae60">((((index term)))</span>).
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Rendered as-is</span>
|
|
|
|
This is (()) not an index term as it is empty.
|
|
|
|
This is (not an index term)) as there is a <span style="color:#a43340">`(`</span> missing.
|
|
|
|
This is ((not an index term) as there is a <span style="color:#a43340">`)`</span> missing.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Escaped</span>
|
|
|
|
This is \((not an indexterm)) as it is escaped.
|
|
|
|
This is \(<span style="color:#27ae60">((not a concealed index term))</span>), but still a flow index term as only the outer brackets are escaped.
|
|
|
|
This is \(\((not an indexterm))) as it is fully escaped.
|
|
|
|
This is not a \indexterm2:[flow] index term.
|
|
|
|
This is not a \indexterm:[concealed, index, term] concealed index term.
|
|
|
|
|
|
<span style="color:#27ae60">[index]</span>
|
|
<span style="color:#f44f4f;font-weight:bold">== Index Catalog</span>
|
|
|
|
<span style="color:#27ae60">WARNING:</span> HTML output currently does not support the creation of the index catalog.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Link</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== ftp, irc</span>
|
|
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">ftp://some.org/some/where/file.extension</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">irc://some.org/some/where/file.extension</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== http(s)</span>
|
|
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">http://some.org/some/where/file.extension</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension</span>
|
|
|
|
<span style="color:#7a7c7d">// . , ; : followed by a space terminate the link</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension</span>. some text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension.some</span> text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension</span>, some text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension,some</span> text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension</span>; some text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension;some</span> text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension</span>: some text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension</span> some text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension:some</span> text
|
|
|
|
<span style="color:#7a7c7d">// unbalanced square brackets always terminate the link</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension</span>[some text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension</span>[ some text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension</span>]some text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension</span>] some text
|
|
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension[]</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension[some text]</span>trailing text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension[some text]</span>. trailing text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension[some text]</span>, trailing text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension[some text]</span>; trailing text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension[some text]</span>: trailing text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension[some]</span>text] trailing text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension[some ]</span>text] trailing text
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension[some \]text]</span> - with escaped <span style="color:#a43340">`]`</span>
|
|
|
|
<span style="color:#7a7c7d">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#7a7c7d">: highlighting of text within [] ?</span>
|
|
<span style="font-weight:bold">*</span> some text <span style="color:#27aeae;text-decoration:underline">https://some.org/some/where/file.extension[*some text*]</span> trailing text.
|
|
|
|
<span style="color:#7a7c7d">// some characters may be placed before the `http`</span>
|
|
<span style="font-weight:bold">*</span> (<span style="color:#27aeae;text-decoration:underline">https://some.org</span>
|
|
<span style="font-weight:bold">*</span> )<span style="color:#27aeae;text-decoration:underline">https://some.org</span>
|
|
<span style="font-weight:bold">*</span> [<span style="color:#27aeae;text-decoration:underline">https://some.org</span>
|
|
<span style="font-weight:bold">*</span> ]<span style="color:#27aeae;text-decoration:underline">https://some.org</span>
|
|
<span style="font-weight:bold">*</span> ;<span style="color:#27aeae;text-decoration:underline">https://some.org</span>
|
|
<span style="font-weight:bold">*</span> <<span style="color:#27aeae;text-decoration:underline">https://some.org</span>
|
|
<span style="font-weight:bold">*</span> ><span style="color:#27aeae;text-decoration:underline">https://some.org</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Not rendered as Link</span>
|
|
|
|
<span style="font-weight:bold">*</span> {https://some.org
|
|
<span style="font-weight:bold">*</span> }https://some.org
|
|
<span style="font-weight:bold">*</span> ,https://some.org
|
|
<span style="font-weight:bold">*</span> .https://some.org
|
|
<span style="font-weight:bold">*</span> :https://some.org
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== link</span>
|
|
|
|
<span style="font-weight:bold">*</span> link:relative/path - not rendered as link as <span style="color:#a43340">`[]`</span> are misssing
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">link:relative/path[]</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#f67400">##before##</span><span style="color:#27aeae;text-decoration:underline">link:relative/path[]</span><span style="color:#f67400">##after##</span> - no spaces needed
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">link:relative/path/file.extension[local file]</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">link:relative/path/file.extension[local ]</span>file]
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">link:relative/path/file.extension[local \]file]</span> - with escaped <span style="color:#a43340">`]`</span>
|
|
<span style="font-weight:bold">*</span> link:relative/path with spaces/[] - not rendered as link because of spaces
|
|
<span style="font-weight:bold">*</span> link:<span style="color:#da4453">++relative/path with spaces/++</span>[] - but this is rendered as link with spaces
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">link:external.html#anchor[to anchor of local HTML file]</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">link:url[optional link text, optional target attribute, optional role attribute]</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== E-Mail</span>
|
|
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">some.person@org.com</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">some.person@org.com</span>[some one] - brackets supported only with leading <span style="color:#a43340">`mailto:`</span>
|
|
<span style="font-weight:bold">*</span> :some.person@org.com - not rendered as link because of leading <span style="color:#a43340">`:`</span>
|
|
<span style="font-weight:bold">*</span> /some.person@org.com - not rendered as link because of leading <span style="color:#a43340">`/`</span>
|
|
|
|
<span style="font-weight:bold">*</span> mailto:some.person@org.com - not rendered as link as <span style="color:#a43340">`[]`</span> are misssing
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">mailto:some.person@org.com[]</span>
|
|
<span style="font-weight:bold">*</span> <span style="color:#f67400">##before##</span><span style="color:#27aeae;text-decoration:underline">mailto:some.person@org.com[]</span><span style="color:#f67400">##after##</span> - no spaces needed
|
|
<span style="font-weight:bold">*</span> <span style="color:#27aeae;text-decoration:underline">mailto:some.person@org.com[some one]</span>
|
|
<span style="font-weight:bold">*</span> mailto::some.person@org.com[] - not rendered as link because of double <span style="color:#a43340">`:`</span>
|
|
<span style="font-weight:bold">*</span> mailto: <span style="color:#27aeae;text-decoration:underline">some.person@org.com</span>[] - not rendered as mailto because of space after <span style="color:#a43340">`:`</span>, but still as inline email
|
|
<span style="font-weight:bold">*</span> mailto:[some one] - not rendered as link because of missing address
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Escaped</span>
|
|
|
|
<span style="font-weight:bold">*</span> \ftp://some.org/some/where/file.extension
|
|
<span style="font-weight:bold">*</span> \irc://some.org/some/where/file.extension
|
|
<span style="font-weight:bold">*</span> \https://some.org/some/where/file.extension
|
|
<span style="font-weight:bold">*</span> \link:relative/path[]
|
|
<span style="font-weight:bold">*</span> \link:relative/path[]
|
|
<span style="font-weight:bold">*</span> \some.person@org.com
|
|
<span style="font-weight:bold">*</span> \:some.person@org.com
|
|
<span style="font-weight:bold">*</span> \/some.person@org.com
|
|
<span style="font-weight:bold">*</span> \mailto:some.person@org.com[]
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= List</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Bulleted List</span>
|
|
|
|
<span style="color:#7a7c7d">////</span>
|
|
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span><span style="color:#7a7c7d"> The *** without text in the list below should not be highlighted as a horizontal line.</span>
|
|
<span style="color:#7a7c7d">This is going to be problematic, as we would need to know that we are currently inside a list.</span>
|
|
<span style="color:#7a7c7d">////</span>
|
|
<span style="color:#f44f4f;font-style:italic">.using asterisks</span>
|
|
<span style="font-weight:bold">*</span> item 1
|
|
<span style="font-weight:bold"> *</span> * item 2
|
|
Has some text.
|
|
<span style="font-weight:bold">**</span> item 2.1
|
|
Also has some text.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
And an additional paragraph.
|
|
<span style="font-weight:bold">**</span> item 2.2
|
|
<span style="font-weight:bold">***</span> item 2.2.1
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">+</span>
|
|
Markers without a text are <span style="font-style:italic">_no_</span> item.
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline">***</span>
|
|
<span style="font-weight:bold">**</span> item 2.3
|
|
<span style="font-weight:bold">***</span> item 2.3.1
|
|
<span style="font-weight:bold">****</span> item 2.3.1.1
|
|
<span style="font-weight:bold">*</span> item 3
|
|
|
|
<span style="font-weight:bold"> *</span> item 4
|
|
<span style="font-weight:bold">**</span> item 4.1
|
|
**not an item as there is no space
|
|
<span style="font-weight:bold"> **</span> item 4.2
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.using hyphens</span>
|
|
<span style="font-weight:bold">-</span> item 1
|
|
<span style="font-weight:bold"> -</span> item 2
|
|
<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
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.inside a block</span>
|
|
<span style="color:#27ae60;font-weight:bold">****</span>
|
|
<span style="font-weight:bold">*</span> item 1
|
|
<span style="font-weight:bold">**</span> item 1.1
|
|
<span style="color:#27ae60;font-weight:bold">****</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Checklist</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.using asterisks</span>
|
|
<span style="font-weight:bold">* [*]</span> checked
|
|
<span style="font-weight:bold">** [x]</span> also checked
|
|
<span style="font-weight:bold">*** [x]</span> also checked
|
|
<span style="font-weight:bold">*</span> [X] <span style="font-style:italic">_invalid_</span> check (capital X), normal list item
|
|
<span style="font-weight:bold">*</span> [o] <span style="font-style:italic">_invalid_</span> check (invalid character), normal list item
|
|
<span style="font-weight:bold">*</span> [] <span style="font-style:italic">_invalid_</span> check (no space), normal list item
|
|
<span style="font-weight:bold">* [ ]</span> not checked
|
|
<span style="font-weight:bold">*</span> normal list item
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.using hyphens</span>
|
|
<span style="font-weight:bold">- [*]</span> checked
|
|
<span style="font-weight:bold">- [*]</span> also checked
|
|
<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
|
|
<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
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Description List</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Normal format</span>
|
|
<span style="font-weight:bold">Term normal::</span> This is a description.
|
|
<span style="font-weight:bold"> Term indented::</span> This works too.
|
|
|
|
<span style="font-weight:bold">Term multi line::</span>
|
|
This one has multiple lines.
|
|
Two lines to be exact.
|
|
<span style="font-weight:bold">Term L2:::</span> This term is on level 2.
|
|
<span style="font-weight:bold">Term L3::::</span> This term is on level 3.
|
|
<span style="font-weight:bold">Term L4:::::</span> This term is on level 4.
|
|
<span style="font-weight:bold">Term L5::::::</span> This term is on level 5.
|
|
<span style="font-weight:bold">Term with empty definition::</span>
|
|
<span style="font-weight:bold">Term with separated colons ::</span> This one has spaces before the <span style="color:#a43340">`::`</span>.
|
|
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:#a43340">`::`</span>.
|
|
<span style="font-weight:bold">Term with unnumbered list::</span>
|
|
<span style="font-weight:bold">*</span> list item 1
|
|
<span style="font-weight:bold">*</span> list item 2
|
|
<span style="font-weight:bold">Term with multiple colons:: in the term::</span>
|
|
Having multiple <span style="color:#a43340">`::`</span> in one line is OK too.
|
|
<span style="font-weight:bold">.;Strange Term = !?*::</span> This one has a strange term.
|
|
Term 9 : : A space between the double <span style="color:#a43340">`:`</span> does <span style="font-style:italic">_not_</span> work.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Term and description on the same line</span>
|
|
<span style="color:#27ae60">[horizontal]</span>
|
|
<span style="font-weight:bold">Term 1::</span> first level.
|
|
<span style="font-weight:bold">Term 2:::</span> second level.
|
|
<span style="font-weight:bold">Term 3::</span> first level again.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Numbered List</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.using numbers</span>
|
|
<span style="font-weight:bold">1.</span> item 1
|
|
<span style="font-weight:bold">2.</span> item 2
|
|
<span style="font-weight:bold"> 3.</span> item 3
|
|
4 Is not an item.
|
|
Numbers without a trailing dot do <span style="font-style:italic">_not_</span> result in an item.
|
|
<span style="font-weight:bold">123.</span> This is an item with an out-of-sequence number.
|
|
It will be fixed in the rendered output.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.using dots</span>
|
|
<span style="font-weight:bold">.</span> item 1
|
|
<span style="font-weight:bold"> .</span> item 2
|
|
..not an item as there is no space
|
|
<span style="font-weight:bold"> ..</span> item 2.1
|
|
<span style="font-weight:bold"> ..</span> item 2.2
|
|
<span style="font-weight:bold">...</span> item 2.2.1
|
|
<span style="font-weight:bold">....</span> item 2.2.1.1
|
|
<span style="font-weight:bold"> .</span> item 3
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Question and Answer List</span>
|
|
|
|
<span style="color:#27ae60">[qanda]</span>
|
|
<span style="font-weight:bold">What is Asciidoctor?::</span>
|
|
An implementation of the AsciiDoc processor in Ruby.
|
|
<span style="font-weight:bold">Must the answer be indented?::</span>
|
|
It<span style="font-weight:bold;text-decoration:underline">'</span>s not necessary, but possibly.
|
|
<span style="font-weight:bold">What is the answer to the Ultimate Question?::</span> 42
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Macro</span>
|
|
<span style="color:#7a7c7d">// for `btn:`, `kbd:`, `menu:`</span>
|
|
<span style="color:#27aeae">:experimental:</span>
|
|
<span style="color:#7a7c7d">// for icon:tags[] etc.</span>
|
|
<span style="color:#27aeae">:imagesdir: </span><span style="color:#27aeae;font-style:italic">media</span>
|
|
<span style="color:#7a7c7d">// needed to use macro `toc::[]`</span>
|
|
<span style="color:#27aeae">:toc: </span><span style="color:#27aeae;font-style:italic">macro</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== General Information</span>
|
|
|
|
<span style="color:#27ae60">NOTE:</span> There is no space needed before the macro name or after the closing <span style="color:#a43340">`]`</span>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Anchor</span>
|
|
|
|
There is a macro form <span style="color:#27ae60">anchor:anchor-id[Macro Anchor]</span> for anchor definition.
|
|
|
|
See <span style="color:#a43340">`anchor.adoc`</span> for other forms.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Cross Reference</span>
|
|
|
|
<span style="color:#27ae60">xref:anchor-id[macro xref]</span>
|
|
|
|
<span style="color:#27ae60">WARNING:</span> Highlighting for cross references with text spanning multiple lines is not supported.
|
|
|
|
xref:id[
|
|
Line 1 in cross reference text.
|
|
Line 2 in cross reference text.
|
|
]
|
|
|
|
\xref:anchor-id[macro xref] escaped
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Footnote</span>
|
|
|
|
This text has a foonote<span style="color:#27ae60">footnote:[A simple footnote.]</span>.
|
|
|
|
This text has a foonote with id<span style="color:#27ae60">footnoteref:[fn-1, A footnote reference.]</span>.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Icon</span>
|
|
|
|
This is a tag <span style="color:#27ae60">icon:tags[]</span> icon with no color set.
|
|
|
|
This is a blue <span style="color:#27ae60">icon:tags[role="blue"]</span> tag.
|
|
|
|
This is a big green <span style="color:#27ae60">icon:tags[role="green", size="2x"]</span> tag.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Image</span>
|
|
|
|
An image<span style="color:#27ae60">image:logo-outline-color.svg[Logo,25]</span>within some text.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Keyboard Shortcut</span>
|
|
|
|
<span style="color:#27ae60">kbd:[Ctrl+M]</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Menu Selection</span>
|
|
|
|
<span style="color:#27ae60">menu:File[Save]</span>
|
|
|
|
<span style="color:#27ae60">menu:View[Zoom > 1:1]</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Pass</span>
|
|
|
|
<span style="color:#7a7c7d">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#7a7c7d"> Would be nice to highlight the text within the square brackets as passthrough.</span>
|
|
|
|
Some <span style="color:#27ae60">pass:[<u>passthrough</u>]</span> HTML.
|
|
|
|
Some <span style="color:#27ae60">pass:quotes[<u>passthrough with *quoted* text</u>]</span> HTML.
|
|
|
|
Some <span style="color:#27ae60">pass:q[<u>passthrough with *quoted* text</u>]</span> HTML.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Table of Contents</span>
|
|
|
|
<span style="color:#27ae60">toc::[]</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== UI Buttons</span>
|
|
|
|
Press the <span style="color:#27ae60">btn:[OK]</span> button when you are finished.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Escaped</span>
|
|
|
|
This is no anchor \anchor:macro-anchor[Macro Anchor].
|
|
|
|
This is no button \btn:[Cancel].
|
|
|
|
This is no foonote\footnote:[A simple footnote.].
|
|
|
|
This is no foonote with id\footnoteref:[fn-1, A footnote reference.].
|
|
|
|
This is no image\image:logo-outline-color.svg[Tree, 25].
|
|
|
|
This is no icon \icon:tags[].
|
|
|
|
This is no keyboard shortcut \kbd:[Ctrl+M].
|
|
|
|
This is no menu \menu:File[Save].
|
|
|
|
This is no passthrough \pass:[<u>passthrough</u>].
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Media</span>
|
|
<span style="color:#7a7c7d">// The name `imagesdir` is a bit misleading as audio and video use also this prefix.</span>
|
|
<span style="color:#27aeae">:imagesdir: </span><span style="color:#27aeae;font-style:italic">media</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Audio</span>
|
|
|
|
<span style="color:#27ae60">audio::test.mp3[]</span>
|
|
|
|
<span style="color:#27ae60">audio::test.mp3[options="loop"]</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Escaped</span>
|
|
\audio::test.mp3[]
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Image</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Block Format</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Test SVG</span>
|
|
<span style="color:#8e44ad">[#logo]</span>
|
|
<span style="color:#27ae60">[link=https://github.com/asciidoctor/brand]</span>
|
|
<span style="color:#27ae60">image::test.svg[Test, 100]</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">==== Not highlighted</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.leading spaces, literal paragraph</span>
|
|
<span style="color:#a43340"> image::test.svg[Test, 100]</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.trailing characters</span>
|
|
image::test.svg[Test, 100] trailing
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">==== Escaped</span>
|
|
|
|
\image::test.svg[Asciidoctor Logo, 100]
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Inline Format</span>
|
|
|
|
Within<span style="color:#27ae60">image:logo-outline-color.svg[Tree, 25]</span>some text.
|
|
|
|
<span style="color:#27ae60">NOTE:</span> There is no space needed before <span style="color:#a43340">`image`</span> and none after the closing <span style="color:#a43340">`]`</span>.
|
|
|
|
<span style="color:#27ae60">image:logo-outline-color.svg[Tree, 25]</span> at line start.
|
|
|
|
At line end <span style="color:#27ae60">image:logo-outline-color.svg[Tree, 25]</span>
|
|
|
|
(<span style="color:#27ae60">image:logo-outline-color.svg[Tree, 25]</span>) wrapped in non-space characters.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">==== Not highlighted</span>
|
|
|
|
image
|
|
|
|
image:
|
|
|
|
someimage:
|
|
|
|
some:image
|
|
|
|
some image:[]
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">==== Escaped</span>
|
|
|
|
Within\image:logo-outline-color.svg[Tree, 25]some text.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Video</span>
|
|
|
|
<span style="color:#27ae60">video::test.mp4[width=300]</span>
|
|
|
|
<span style="color:#27ae60">video::test.mp4[width=200, options=loop]</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Escaped</span>
|
|
\video::test.mp4[]
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Page break</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Rendered as page break</span>
|
|
|
|
<span style="color:#fdbc4b;font-weight:bold;text-decoration:underline"><<<</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Not rendered as page break</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Not a page break as it is indented</span>
|
|
<span style="color:#a43340"> <<<</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Not a page break as it has trailing non-space characters</span>
|
|
<<< extra characters
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Escaped</span>
|
|
\<<<
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Preprocessor</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== If Defined</span>
|
|
|
|
<span style="color:#27aeae">:!attr-1:</span>
|
|
<span style="color:#27ae60">ifdef::attr-1[]</span>
|
|
This line is <span style="font-style:italic">_not_</span> rendered as the attribute is not defined.
|
|
<span style="color:#27ae60">endif::[]</span>
|
|
|
|
<span style="color:#27aeae">:attr-1:</span>
|
|
<span style="color:#27ae60">ifdef::attr-1[]</span>
|
|
This line <span style="font-style:italic">_is_</span> rendered as the attribute is now defined.
|
|
<span style="color:#27ae60">endif::[]</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Short form avoiding </span><span style="color:#a43340">`endif`</span>
|
|
<span style="color:#27ae60">ifdef::attr-1[The attribute `attr-1` is defined]</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== If Not Defined</span>
|
|
|
|
<span style="color:#27aeae">:!attr-1:</span>
|
|
<span style="color:#27ae60">ifndef::some-attribute[]</span>
|
|
This line <span style="font-style:italic">_is_</span> rendered as it is inside a 'if-not-defined' statement and <span style="color:#a43340">`some-attribute`</span> is not defined.
|
|
<span style="color:#27ae60">endif::some-attribute[]</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Short form avoiding </span><span style="color:#a43340">`endif`</span>
|
|
<span style="color:#27ae60">ifndef::some-attribute[The attribute `attr-1` is _not_ defined]</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Any (or)</span>
|
|
|
|
<span style="color:#27aeae">:!attr-1:</span>
|
|
<span style="color:#27aeae">:!attr-2:</span>
|
|
<span style="color:#27aeae">:attr-3:</span>
|
|
<span style="color:#27ae60">ifdef::attr-1,attr-2,attr-3[]</span>
|
|
This line is rendered as at least one of the attributes is defined.
|
|
<span style="color:#27ae60">endif::[]</span>
|
|
|
|
<span style="color:#27aeae">:!attr-1:</span>
|
|
<span style="color:#27aeae">:!attr-2:</span>
|
|
<span style="color:#27aeae">:!attr-3:</span>
|
|
<span style="color:#27ae60">ifdef::attr-1,attr-2,attr-3[]</span>
|
|
This line is not rendered as none of the attributes is defined.
|
|
<span style="color:#27ae60">endif::[]</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== None (nor)</span>
|
|
|
|
<span style="color:#27aeae">:!attr-1:</span>
|
|
<span style="color:#27aeae">:!attr-2:</span>
|
|
<span style="color:#27aeae">:!attr-3:</span>
|
|
<span style="color:#27ae60">ifndef::attr-1,attr-2,attr-3[]</span>
|
|
This line is rendered as none of the attributes is defined.
|
|
<span style="color:#27ae60">endif::[]</span>
|
|
|
|
<span style="color:#27aeae">:!attr-1:</span>
|
|
<span style="color:#27aeae">:!attr-2:</span>
|
|
<span style="color:#27aeae">:attr-3:</span>
|
|
<span style="color:#27ae60">ifndef::attr-1,attr-2,attr-3[]</span>
|
|
This line is not rendered as at least one of the attributes is defined.
|
|
<span style="color:#27ae60">endif::[]</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== All (and)</span>
|
|
|
|
<span style="color:#27aeae">:attr-1:</span>
|
|
<span style="color:#27aeae">:attr-2:</span>
|
|
<span style="color:#27aeae">:attr-3:</span>
|
|
<span style="color:#27ae60">ifdef::attr-1+attr-2+attr-3[]</span>
|
|
This line is rendered as all the attributes are defined.
|
|
<span style="color:#27ae60">endif::[]</span>
|
|
|
|
<span style="color:#27aeae">:attr-1:</span>
|
|
<span style="color:#27aeae">:attr-2:</span>
|
|
<span style="color:#27aeae">:!attr-3:</span>
|
|
<span style="color:#27ae60">ifndef::attr-1+attr-2+attr-3[]</span>
|
|
This line is not rendered as at least one of the attributes is not defined.
|
|
<span style="color:#27ae60">endif::[]</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Not All (nand)</span>
|
|
|
|
<span style="color:#27aeae">:attr-1:</span>
|
|
<span style="color:#27aeae">:attr-2:</span>
|
|
<span style="color:#27aeae">:!attr-3:</span>
|
|
<span style="color:#27ae60">ifndef::attr-1+attr-2+attr-3[]</span>
|
|
This line is rendered as at least one of the attributes is defined.
|
|
<span style="color:#27ae60">endif::[]</span>
|
|
|
|
<span style="color:#27aeae">:attr-1:</span>
|
|
<span style="color:#27aeae">:attr-2:</span>
|
|
<span style="color:#27aeae">:attr-3:</span>
|
|
<span style="color:#27ae60">ifndef::attr-1+attr-2+attr-3[]</span>
|
|
This line is not rendered as all the attributes are not defined.
|
|
<span style="color:#27ae60">endif::[]</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== If Eval</span>
|
|
|
|
<span style="color:#27aeae">:two: </span><span style="color:#27aeae;font-style:italic">2</span>
|
|
<span style="color:#27ae60">ifeval::[{two} > 1]</span>
|
|
This line is rendered as the expression evaluates to true.
|
|
<span style="color:#27ae60">endif::[]</span>
|
|
|
|
<span style="color:#27aeae">:not-true: </span><span style="color:#27aeae;font-style:italic">false</span>
|
|
<span style="color:#27ae60">ifeval::[{not-true} == true]</span>
|
|
This line is not rendered as the expression evaluates to false.
|
|
<span style="color:#27ae60">endif::[]</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Escaped</span>
|
|
|
|
<span style="color:#27aeae">:!attr-1:</span>
|
|
\ifdef::attr-1[]
|
|
This line is rendered as the <span style="color:#a43340">`ifdef`</span>-statement is escaped.
|
|
\endif::[]
|
|
|
|
<span style="color:#27aeae">:!attr-1:</span>
|
|
\ifndef::some-attribute[Only if the attribute is not defined]
|
|
This line is rendered as the <span style="color:#a43340">`ifndef`</span>-statement is escaped.
|
|
\endif::some-attribute[]
|
|
|
|
<span style="color:#27aeae">:not-true: </span><span style="color:#27aeae;font-style:italic">false</span>
|
|
\ifeval::[<span style="color:#27aeae">{not-true}</span> == true]
|
|
This line is rendered as the <span style="color:#a43340">`ifeval`</span>-statement is escaped.
|
|
\endif::[]
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Quote and Verse</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Quote</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous block / paragraph</span>
|
|
<span style="color:#27ae60">[quote, attribution, citation title and information]</span>
|
|
<span style="color:#8e44ad">[[quote-block-id]]</span>
|
|
Inside the <span style="font-weight:bold">*contiguous block quote*</span>.
|
|
Last line of the quote block.
|
|
|
|
This line is not part of the contiguous block quote anymore.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited with block name</span>
|
|
<span style="color:#27ae60">[quote, attribution, citation title and information]</span>
|
|
<span style="color:#8e44ad">[[quote-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">____</span>
|
|
Inside the <span style="font-weight:bold">*delimited block quote*</span>.
|
|
|
|
May contain emtpy lines.
|
|
<span style="color:#27ae60;font-weight:bold">____</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited without block name</span>
|
|
<span style="color:#8e44ad">[[quote-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">____</span>
|
|
Inside the <span style="font-weight:bold">*delimited block quote*</span>.
|
|
|
|
May contain emtpy lines.
|
|
<span style="color:#27ae60;font-weight:bold">____</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Using an open block</span>
|
|
<span style="color:#27ae60">[quote]</span>
|
|
<span style="color:#8e44ad">[[quote-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
Inside the <span style="font-weight:bold">*open block quote*</span>.
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Nested block quote</span>
|
|
<span style="color:#27ae60">[quote, outer attribution, outer citation title and information]</span>
|
|
<span style="color:#8e44ad">[[quote-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">____</span>
|
|
First line of outer quote.
|
|
<span style="color:#27ae60">[quote, inner attribution, inner citation title and information]</span>
|
|
<span style="color:#8e44ad">[[quote-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">______</span>
|
|
Inside the inner quote.
|
|
<span style="color:#27ae60;font-weight:bold">______</span>
|
|
Last line of outer quote.
|
|
<span style="color:#27ae60;font-weight:bold">____</span>
|
|
|
|
<span style="color:#7a7c7d">// Currently no specific highlighting supported.</span>
|
|
<span style="color:#f44f4f;font-style:italic">.Quoted paragraph</span>
|
|
"Inside the <span style="font-weight:bold">*quoted paragraph*</span>.
|
|
As being a paragraph, no empty lines are supported."
|
|
<span style="font-weight:bold;text-decoration:underline">--</span> attribution, citation title and information
|
|
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Air quote</span>
|
|
<span style="color:#27ae60">[,attribution, citation title and information]</span>
|
|
<span style="color:#27ae60;font-weight:bold">"" </span>
|
|
Inside the <span style="font-weight:bold">*air quote*</span>.
|
|
|
|
Supports empty lines.
|
|
<span style="color:#27ae60;font-weight:bold">""</span>
|
|
|
|
<span style="color:#7a7c7d">// Currently no specific highlighting supported.</span>
|
|
<span style="color:#f44f4f;font-style:italic">.Markdown style</span>
|
|
> Inside the <span style="font-weight:bold">*markdown quote*</span>.
|
|
>
|
|
> May contain emtpy lines.
|
|
> <span style="font-weight:bold;text-decoration:underline">--</span> attribution, citation title and information
|
|
|
|
<span style="color:#7a7c7d">// Currently no specific highlighting supported.</span>
|
|
<span style="color:#f44f4f;font-style:italic">.Nested markdown style</span>
|
|
> Start of outer quote.
|
|
>
|
|
> > Some inner quote.
|
|
>
|
|
> * can use AsciiDoc <span style="font-weight:bold;text-decoration:underline">...</span>
|
|
> * inside markdown block
|
|
>
|
|
> > Another inner quote.
|
|
>
|
|
> End of outer quote.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Verse</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Contiguous block / paragraph</span>
|
|
<span style="color:#27ae60">[verse, attribution, citation title and information]</span>
|
|
<span style="color:#8e44ad">[[verse-block-id]]</span>
|
|
Inside the <span style="font-weight:bold">*contiguous block verse*</span>.
|
|
Second line of the verse block.
|
|
|
|
This line is not part of the contiguous verse block anymore.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited block with name</span>
|
|
<span style="color:#27ae60">[verse, attribution, citation title and information]</span>
|
|
<span style="color:#8e44ad">[[verse-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">____</span>
|
|
Inside the <span style="font-weight:bold">*delimited block verse*</span>.
|
|
|
|
Supports empty lines.
|
|
<span style="color:#27ae60;font-weight:bold">____</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Delimited block without name</span>
|
|
This would be rendered as a quote block as the same delimiters are used.
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Using an open block</span>
|
|
<span style="color:#27ae60">[verse, attribution, citation title and information]</span>
|
|
<span style="color:#8e44ad">[[verse-block-id]]</span>
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
Inside the <span style="font-weight:bold">*open block verse*</span>.
|
|
<span style="color:#27ae60;font-weight:bold">--</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Replacement</span>
|
|
|
|
<span style="color:#27ae60">TIP:</span> See also the <span style="color:#27aeae;text-decoration:underline">https://asciidoctor.org/docs/user-manual/#replacements[corresponding section]</span> in the Asciidoctor manual.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Textual symbol replacements</span>
|
|
|
|
<span style="color:#27ae60;font-weight:bold">|===</span>
|
|
<span style="color:#27ae60;font-weight:bold">|</span>Name <span style="color:#27ae60;font-weight:bold">|</span>Syntax <span style="color:#27ae60;font-weight:bold">|</span>Escaped
|
|
|
|
<span style="color:#27ae60;font-weight:bold">|</span>copyright <span style="color:#27ae60;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">(C)</span> <span style="color:#27ae60;font-weight:bold">|</span>\(C)
|
|
<span style="color:#27ae60;font-weight:bold">|</span>registered <span style="color:#27ae60;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">(R)</span> <span style="color:#27ae60;font-weight:bold">|</span>\(R)
|
|
<span style="color:#27ae60;font-weight:bold">|</span>trademark <span style="color:#27ae60;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">(TM)</span> <span style="color:#27ae60;font-weight:bold">|</span>\(TM)
|
|
|
|
<span style="color:#27ae60;font-weight:bold">|</span>apostrophe <span style="color:#27ae60;font-weight:bold">|</span>KDE<span style="font-weight:bold;text-decoration:underline">'</span>s <span style="color:#27ae60;font-weight:bold">|</span>KDE\'s
|
|
<span style="color:#27ae60;font-weight:bold">|</span>ellipses <span style="color:#27ae60;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">...</span> <span style="color:#27ae60;font-weight:bold">|</span>\... <span style="color:#27ae60">footnote:[Escaping has no effect]</span>
|
|
<span style="color:#27ae60;font-weight:bold">|</span>m dash <span style="color:#27ae60;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">--</span> <span style="color:#27ae60;font-weight:bold">|</span>\-- <span style="color:#27ae60">footnote:[Escaping yields another different dash]</span>
|
|
|
|
<span style="color:#27ae60;font-weight:bold">|</span>left single arrow <span style="color:#27ae60;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline"><-</span> <span style="color:#27ae60;font-weight:bold">|</span>\<-
|
|
<span style="color:#27ae60;font-weight:bold">|</span>right single arrow <span style="color:#27ae60;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">-></span> <span style="color:#27ae60;font-weight:bold">|</span>\->
|
|
<span style="color:#27ae60;font-weight:bold">|</span>left double arrow <span style="color:#27ae60;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline"><=</span> <span style="color:#27ae60;font-weight:bold">|</span>\<=
|
|
<span style="color:#27ae60;font-weight:bold">|</span>right double arrow <span style="color:#27ae60;font-weight:bold">|</span><span style="font-weight:bold;text-decoration:underline">=></span> <span style="color:#27ae60;font-weight:bold">|</span>\=>
|
|
<span style="color:#27ae60;font-weight:bold">|===</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Not replaced</span>
|
|
|
|
<span style="color:#7a7c7d">// Single apostrophe must be surrounded by alphabetic characters.</span>
|
|
<span style="font-weight:bold">*</span> a'
|
|
<span style="font-weight:bold">*</span> 'a
|
|
<span style="font-weight:bold">*</span> .'.
|
|
<span style="font-weight:bold">*</span> a'.
|
|
<span style="font-weight:bold">*</span> .'a
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Numerical Character Reference</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Decimal</span>
|
|
|
|
<span style="font-weight:bold;text-decoration:underline">&#0167;</span>
|
|
|
|
<span style="color:#f67400">##before##</span><span style="font-weight:bold;text-decoration:underline">&#0167;</span><span style="color:#f67400">##after##</span>
|
|
|
|
<span style="font-weight:bold;text-decoration:underline">&#167;</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Hexadecimal</span>
|
|
|
|
<span style="font-weight:bold;text-decoration:underline">&#x00A7;</span>
|
|
|
|
<span style="color:#f67400">##before##</span><span style="font-weight:bold;text-decoration:underline">&#x00A7;</span><span style="color:#f67400">##after##</span>
|
|
|
|
<span style="font-weight:bold;text-decoration:underline">&#xA7;</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Escaped</span>
|
|
|
|
\&#0167;
|
|
\&#167;
|
|
\&#x00A7;
|
|
\&#xA7;
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== HTML/XML Character Entity References</span>
|
|
|
|
See e.g. <span style="color:#27aeae;text-decoration:underline">https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references[Wikipedia]</span>.
|
|
|
|
<span style="color:#27ae60">IMPORTANT:</span> Highlighting of HTML/XML character entity references is <span style="font-style:italic">_not_</span> supported.
|
|
There are just too many of them.
|
|
|
|
<span style="color:#7a7c7d">// some examples</span>
|
|
<span style="color:#27ae60;font-weight:bold">====</span>
|
|
&ne;
|
|
&equiv;
|
|
<span style="color:#27ae60;font-weight:bold">====</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Section L0</span>
|
|
|
|
<span style="color:#27ae60">[abstract]</span>
|
|
<span style="color:#f44f4f;font-weight:bold">== Abstract</span>
|
|
|
|
This document is used for testing various aspects of syntax highlighting regarding sections.
|
|
|
|
<span style="color:#27aeae">:title-attribute: </span><span style="color:#27aeae;font-style:italic">with attribute</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Section L1</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Section L2</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">==== Section L3</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">===== Section L4</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">====== Section L5</span>
|
|
|
|
======= This is not a new section
|
|
|
|
The level would be too deep.
|
|
Only sections up to level 5 (having 6 leading <span style="color:#a43340">`=`</span>) are supported.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">#### Section L3</span>
|
|
|
|
Using Markdown section syntax works too.
|
|
|
|
=<span style="color:#f67400">#=#</span> This is not a section.
|
|
Use either <span style="color:#a43340">`=`</span> or <span style="color:#a43340">`#`</span>, but not mixed.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">===== </span><span style="color:#8e44ad">[[id-1]]</span><span style="color:#f44f4f;font-weight:bold"> </span><span style="color:#8e44ad">[[id-2]]</span><span style="color:#f44f4f;font-weight:bold"> Section L4</span>
|
|
|
|
This section has leading additional achors.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">==== Section L3 </span><span style="color:#8e44ad">[[id-1]][[id-2]]</span>
|
|
|
|
This section has trailing additional anchors.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">==== </span><span style="color:#8e44ad">[[id-1]][[id-2]]</span><span style="color:#f44f4f;font-weight:bold">Section L3</span><span style="color:#8e44ad">[[id-3]][[id-4]]</span>
|
|
|
|
This section has both leading and trailing additional anchors.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">==== Section L3 </span><span style="color:#27aeae">{title-attribute}</span><span style="color:#f44f4f;font-weight:bold"> in Title</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.Title </span><span style="color:#27aeae">{title-attribute}</span>
|
|
This section has an attribute in its title.
|
|
|
|
|
|
<span style="color:#27ae60">[discrete]</span>
|
|
<span style="color:#f44f4f;font-weight:bold">== Discrete Section</span>
|
|
|
|
This section will not be shown in the table of contents.
|
|
|
|
<span style="color:#7a7c7d">////</span>
|
|
<span style="color:#7a7c7d">== Section with _emphasized_ text</span>
|
|
|
|
<span style="color:#7a7c7d">=== Section with escaped \_emphasized_ text</span>
|
|
<span style="color:#7a7c7d">////</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Section with </span><span style="color:#f67400">#marked#</span><span style="color:#f44f4f;font-weight:bold"> text</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Section with escaped \</span>#<span style="color:#f44f4f;font-weight:bold">marked# text</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Section with </span><span style="color:#a43340">`monospaced`</span><span style="color:#f44f4f;font-weight:bold"> text</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Section with escaped \</span>`<span style="color:#f44f4f;font-weight:bold">monospaced` text</span>
|
|
|
|
<span style="color:#7a7c7d">////</span>
|
|
<span style="color:#7a7c7d">== Section with *strong* text</span>
|
|
|
|
<span style="color:#7a7c7d">=== Section with escaped \*strong* text</span>
|
|
<span style="color:#7a7c7d">////</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Another Section at Level 0</span>
|
|
|
|
Some text in the second level 0 section.
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Section 2.1</span>
|
|
|
|
Some text.
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">= Table</span>
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Default Separator</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.PSV</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#8e44ad">[[table-1]]</span>
|
|
<span style="color:#27ae60">[.some-role]</span>
|
|
<span style="color:#8e44ad">[#table-shorthand]</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#27ae60;font-weight:bold">|===</span>
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
<span style="color:#27ae60;font-weight:bold">|</span> header col 1 <span style="color:#27ae60;font-weight:bold">|</span> header col 2 <span style="color:#27ae60;font-weight:bold">|</span> header col 3
|
|
<span style="color:#7a7c7d">// some comment</span>
|
|
|
|
<span style="color:#7a7c7d">// with escaped cell separator</span>
|
|
<span style="color:#27ae60;font-weight:bold">|</span> row 1 \| col 1 <span style="color:#27ae60;font-weight:bold">|</span> row 1 col 2 <span style="color:#27ae60;font-weight:bold">|</span> row 1 col 3
|
|
<span style="color:#7a7c7d">// no spaces needed around `|`</span>
|
|
<span style="color:#27ae60;font-weight:bold">|</span> <span style="font-weight:bold">*row*</span> 2 col 1<span style="color:#27ae60;font-weight:bold">|</span>row 2 col 2<span style="color:#27ae60;font-weight:bold">|</span>row 2 col 3
|
|
|
|
<span style="color:#27ae60;font-weight:bold">|</span>row 3 col 1
|
|
<span style="color:#7a7c7d">// using attribute</span>
|
|
<span style="color:#27ae60;font-weight:bold">|</span> row 3 col 2 <span style="color:#27aeae">{vbar}</span>
|
|
<span style="color:#27ae60;font-weight:bold">|</span>ro3 3 col 3
|
|
|
|
<span style="color:#27ae60;font-weight:bold">|</span> row 4 col 1 <span style="color:#27ae60;font-weight:bold">a|</span>some AsciiDoc in col 2 row 4
|
|
|
|
<span style="font-weight:bold">*</span> item 1
|
|
<span style="font-weight:bold">*</span> item 2
|
|
<span style="color:#27ae60;font-weight:bold">|</span>row 4 col 3
|
|
|
|
<span style="color:#27ae60;font-weight:bold">2*|</span> row 5 has same contents in first 2 columns
|
|
<span style="color:#27ae60;font-weight:bold">|</span>row 5 col 3
|
|
|
|
<span style="color:#27ae60;font-weight:bold">|</span>row 6 col 1 <span style="color:#27ae60;font-weight:bold">2+|</span> span row 6 in col 2 and 3
|
|
|
|
<span style="color:#27ae60;font-weight:bold">.2+|</span>span col 1 in row 6 and 7<span style="color:#27ae60;font-weight:bold">|</span>row 6 col 2<span style="color:#27ae60;font-weight:bold">|</span>row 6 col 3
|
|
<span style="color:#27ae60;font-weight:bold">|</span>row 7 col 2<span style="color:#27ae60;font-weight:bold">|</span>row 7 col 3
|
|
|
|
<span style="color:#27ae60;font-weight:bold">2.2+^.^|</span>span col 1 and 2 in row 8 and 9<span style="color:#27ae60;font-weight:bold">|</span>row 8 col 3
|
|
<span style="color:#27ae60;font-weight:bold">|</span>row 9 col 3
|
|
|
|
<span style="color:#27ae60;font-weight:bold">e|</span>row 10 col 1 is emphasized (italic)
|
|
<span style="color:#27ae60;font-weight:bold">s|</span>row 10 col 2 is strong (bold)
|
|
<span style="color:#27ae60;font-weight:bold">m|</span>row 10 col 3 is monospaced
|
|
<span style="color:#27ae60;font-weight:bold">|===</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Custom Separator</span>
|
|
|
|
<span style="color:#27ae60">IMPORTANT:</span> Highlighting of tables with custom separator is not supported.
|
|
All <span style="color:#a43340">`|`</span> inside the table will be falsly highlighted.
|
|
|
|
<span style="color:#27ae60">[separator=!]</span>
|
|
<span style="color:#27ae60;font-weight:bold">|===</span>
|
|
<span style="color:#7a7c7d">// the `|` in the line below should not be highlighted.</span>
|
|
!row 1 <span style="color:#27ae60;font-weight:bold">|</span> col 1 !row 1 col 2
|
|
s!row 2 col 1 !row 2 col 2
|
|
<span style="color:#27ae60;font-weight:bold">|===</span>
|
|
|
|
<span style="color:#27ae60">[separator=a]</span>
|
|
<span style="color:#27ae60;font-weight:bold">|===</span>
|
|
arow 1 col 1 arow 1 col 2
|
|
sarow 2 col 1 arow 2 col 2
|
|
<span style="color:#27ae60;font-weight:bold">|===</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">== Delimiter-Separated Values</span>
|
|
|
|
<span style="color:#27ae60">IMPORTANT:</span> Highlighting for tables with delimiter-separated values is not supported.
|
|
All <span style="color:#a43340">`|`</span> inside the table will be falsly highlighted.
|
|
|
|
<span style="color:#27ae60">[format=csv]</span>
|
|
<span style="color:#27ae60;font-weight:bold">|===</span>
|
|
Col 1 ,Col 2 ,Col 3
|
|
|
|
<span style="color:#7a7c7d">// the `|` in the line below should not be highlighted.</span>
|
|
row 1 <span style="color:#27ae60;font-weight:bold">|</span> col 1 ,row 1 col 2 ,row 1 col 3
|
|
row 2 col 2,row 2 col 2,row 2 col 3
|
|
|
|
row 3 col 3 , "row ""3"", col 2" , row 3 col 3
|
|
<span style="color:#27ae60;font-weight:bold">|===</span>
|
|
|
|
|
|
<span style="color:#f44f4f;font-weight:bold">=== Shorthand Notation for Data Tables</span>
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.CSV</span>
|
|
,===
|
|
Col 1 ,Col 2 ,Col 3
|
|
|
|
row 1 col 1 ,row 1 col 2 ,row 1 col 3
|
|
row 2 col 2,row 2 col 2,row 2 col 3
|
|
|
|
row 3 col 3 , "row ""3"", col 2" , row 3 col 3
|
|
,===
|
|
|
|
<span style="color:#f44f4f;font-style:italic">.DSV</span>
|
|
:===
|
|
Col 1 :Col 2 :Col 3
|
|
|
|
row 1 col 1 :row 1 col 2 :row 1 col 3
|
|
row 2 col 2:row 2 col 2:row 2 col 3
|
|
row 3 col 3 : row 3 col 2 : row 3 col 3
|
|
:===
|
|
|
|
|
|
</pre></body></html>
|