<beginfold id='1'>= </beginfold id='1'>AsciiDoc Syntax Highlighting
// There are multiple level 0 sections, so use book instead of article.
:doctype: book
// For nice admonition and callout icons.
:icons: font
:toc: left

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.


<endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Known Not to Work

There are a couple of things that are known not to work.


<beginfold id='1'>== </beginfold id='1'>Block

* Highlighting of attributes inside a block title.

* Highlighting of formatted text inside a block title other than ...
** #marked#
** `monospaced`

* Code folding for contiguous blocks.
+
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.

* Multiple lines of meta data.
+
.For delimited blocks, Asciidoctor supports something like this:
<beginfold id='2'>-----</beginfold id='2'>
[source]
[, options="nowrap"]
----
puts 'hello'
----
<endfold id='2'>-----</endfold id='2'>
+
Syntax highlighting does not recognize the additional meta data lines and will rather interpret this as a contiguous block.

* https://asciidoctor.org/docs/user-manual/#discrete-headings[Discrete headings]  inside block.
+
<beginfold id='2'>-----</beginfold id='2'>
****
Some text.

[discrete]
=== Discrete Heading

Some more text.
****
<endfold id='2'>-----</endfold id='2'>
+
Syntax highlighting does not recognize discrete headings inside a block.
If a normal section title is marked as being discrete, highlighting works.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Custom Styles

* Highlighting of formatted text within the phrase to be styled.
+
  Some [big]#big and *strong*# text.

* Highlighting of styles with a phrase that spans multiple lines.
+
<beginfold id='2'>----</beginfold id='2'>
[big]#this
is
not
highlighted#
<endfold id='2'>----</endfold id='2'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Formatted/Quoted Text

* Highlighting of formatted/quoted text (e.g. monospaced) that spans multiple lines.

* Highlighting combinations besides those of emphasized, strong and monospaced.
** Attributes inside other formatting.
+
  `{attribute-id} inside monospaced`

** Passthrough inside other formatting.
+
  `+passthrough+ inside monospaced`

** Marked text inside other formatting.
+
  `#marked# inside monospaced`

** Subscript inside other formatting.
+
  `~sub~script inside monospaced`

** Superscript inside other formatting.
+
  `^super^script inside monospaced`

And even more complex combinations.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>List

* Inside a list, indented lines without leading asterisks or hyphen start highlighting for a verbatim paragraph.
Asciidoctor renders this as normal text.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Macro

* Highlighting of macros with a text argument that spans multiple lines.
+
<beginfold id='2'>----</beginfold id='2'>
xref:id[this works just fine]

xref:id[
highlighting a macro with
a text that spans multiples
does not work
]
<endfold id='2'>----</endfold id='2'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Quote, Verse

* Highlighting for single quote symbol `"`.
+
Highlighting for air quotes `""` is supported.

* Highlighting for Markdown style quotes.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Replacement

Highlighting for replacements is limited to those listed in the https://asciidoctor.org/docs/user-manual/#replacements[Asciidoctor Manual] and numerical character references.

Highlighting for other https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references[HTML/XML character references] is not supported.

.Examples of supported references
* `+(C)+` resulting in (C)
* `+=>+` resulting in =>
* `+&#188;+` resulting in &#188;

.Examples of references that are not supported
* `+&frac14;+` resulting in &frac14;
* `+&phi;+` resulting in &phi;


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Section

* Setext style for section titles.
+
Only Atx style is supported.
+
NOTE: Asciidoctor's https://asciidoctor.org/docs/asciidoc-recommended-practices/[recommended practices] states _not_ to use Setext style for section titles.

* Highlighting of formatted/quoted text inside section title other than ...
** #marked#
** `monospaced`


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Table

* Highlighting of tables with custom separator.
** The custom separator will _not_ be highlighted.
** All `|` inside the table _will be falsly_ highlighted.

* Highlighting of delimiter-separated tables.
** Table delimiters in shorthand notation and the value separator will _not_ be highlighted.
** All `|` inside the table _will be falsly_ highlighted.

* Applying styles on table contents.
+
When defining a table, individual columns or cells can be defined to be highlighted *strong* etc..
Corresponding highlighting of these cells does not work.



<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Admonition

<beginfold id='1'>== </beginfold id='1'>Simple Format

NOTE: A simple note.

<beginfold id='3'>////</beginfold id='3'>
FIXME: In the paragraph below is no note as it is started in the middle of the paragraph.
This is problematic as we would need to know that the note line is not the first line in the paragraph.
<endfold id='3'>////</endfold id='3'>
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 `:`.

  NOTE: This is not a note as it is indented.

NOTE : This is not a note as there are spaces between `NOTE` and `:`.

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.

NOTE: 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.

CAUTION: This is a CAUTION.

IMPORTANT: This is IMPORTANT.

TIP: This is a TIP. +
This second line is rendered as a line on its own because of the trailing `+` in the first line.

WARNING: This is a WARNING.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Block Format

.Contiguous
[NOTE]
[[contiguous-note-id]]
This is a contiguous *note* block.
Second line.
And one more line.
// comment inside block
This is the final line.

This line is not part of the contiguous note block anymore.

.Delimited
[NOTE]
[[delimited-note-id]]
<beginfold id='2'>====</beginfold id='2'>
This is a *note* in block format.
As a block, the note may have a title
// comment inside block

In block format, multiple lines, paragraphs etc. are possible.
<endfold id='2'>====</endfold id='2'>

There is no delimited admonition block without block name.
Using `====` delimiter without a block name results in an example block.

.Using open block
[NOTE]
<beginfold id='2'>--</beginfold id='2'>
Inside the open block note.
<endfold id='2'>--</endfold id='2'>


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= [[main-1]]An[[main-2]]chor[[main-3]] and Cross Reference

<beginfold id='1'>== </beginfold id='1'>[[section-1]][[section-2]] An[[section-3]][[section-4]]chor[[section-5]]

[[isolated-anchor]]
Isolated anchor.

[[isolated-anchor-with-label,Isolated Anchor With Label]]
Isolated anchor with label.

This line has an [[inline-anchor, Inline Anchor]]anchor placed inside the text.

[#isolated-shorthand]
Isolated anchor using shorthand definition.

[#isolated-shorthand, Isolated Shorthand Anchor]
Isolated anchor with label using shorthand definition.

This line has an   [    #inline-shorthand    ]#anchor placed inside the text#  #.

.Inside [[block-anchor]]block title
Works too.

.Macro form
There is also a maanchor:anchor-id[Macro Anchor]cro form for anchor definition.

NOTE: There is no space needed before the `anchor` macro name.
Also not after the closing `]`.


<beginfold id='1'>=== </beginfold id='1'>Not an anchor

[[ not-an-anchor]]
because of the space after the opening brackets.

[[not-an-anchor ]]
because of the space before the closing brackets.

 [[not-an-anchor]] because of line starting with spaces.

 [#not-an-anchor]#because# of line starting with spaces.

[#not-an-anchor] because of trailing text.

Not an anchor because of leading text [#not-an-anchor]

Also[#not-an-anchor]#some text# because of missing space before `[`.

Also [#not-an-anchor] #some text# because of space after `]`.

Also [#not-an-anchor]# some text# because of space after the leading `#`.

Also [#not-an-anchor]because of missing referred text (e.g. `#some text#`).


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Escaped

This is an escaped \[[anchor-id, some #anchor# label]] anchor.

This is just some \normal text.

Some\[[anchor-id]]anchor.

\[[anchor-id]]

<beginfold id='3'>////</beginfold id='3'>
FIXME: highlighting differs
Asciidoctor seems to just pass through the anchor when escaping it.
This behaviour is rather unexpected, as in other cases the escaped contents is subject to further highlighting.

We currently only consume the opening bracket.
<endfold id='3'>////</endfold id='3'>
This is an escaped \[#shorthand-id]#anchor in shorthand form#.

Some \[#shorthand-id].

\[#shorthand-id]

\[#shorthand-id]#


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Cross References

<<main-1>>

<<main-2>>

<<main-3>>

<<section-1>>

This is a reference to <<section-2>>.

<<section-3>> some text >> some more text

some << text <<<section-4>>>

<<section-5>>

<<isolated-anchor>>

<<isolated-anchor-with-label>>

<<inline-anchor>>

<<isolated-shorthand>>

<<inline-shorthand>>.

<<block-anchor>>


<beginfold id='1'>=== </beginfold id='1'>Escaped

This is not a reference \<<section-1>>.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Attribute

<beginfold id='1'>== </beginfold id='1'>No Value

:some-attribute:
This line should not be highlighted.

  :not-an-attribute: as the line is indented.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Single Line Value

Attributes with values that are rendered as a single line, even if their definition spans multiple lines.

.Single line definition
:single-line: only one line
This line is not part of the attribute value anymore.

##before##{single-line}##after##

:attr-in-attr-value: in multi line definition

.Multi line definition
:single-line-continued: First line {attr-in-attr-value}. \
Second line. \
Another line.
This line is not part of the attribute value anymore.

##before##{single-line-continued}##after##

IMPORTANT: At least one space is needed before the continuation `\`.

.Line continuation is only highlighted when inside an attribute definition
some \
text


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Multi Line Value

Attributes with values including hard line breaks.

IMPORTANT: At least one space is needed before the continuation `+` and between the `+` and the `\`.

:multi-line: First line. + \
Second line.   +    \
Third line.
This line is not part of the attribute value anymore.

##before##{multi-line}##after##


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Inline Definition

Inline attribute definitions {set:inline-attribute:just fine} works {inline-attribute}.

.Surplus `:` is part of the value
{set:attr::some value}
{attr}

{set:attr}
{attr}

.Not an inline definition as leading `set:` is missing
{single-line:some value}


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Unsetting

:!_custom_2-:
:_custom_2-!:

.Adding a value when unsetting doesn't make sense, but doesn't hurt either
:some-attribute: some value
Attribute is set to `{some-attribute}`.

:!some-attribute: some value
{some-attribute} is not set anymore.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Not an Attribute

:not-an-attribute:as there is no space after the terminating column of the identifier

  :not-an-attribute: as it is indented


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Combination with Other Highlighting

<beginfold id='2'>****</beginfold id='2'>
:inside-a-block: inside a block
Using an attribute {inside-a-block} works too.
<endfold id='2'>****</endfold id='2'>

:inside-formatting: inside formatting
An attribute used `{inside-formatting}` is not highlighting as attribute.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Escaped

\: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.

:attr-1: some attribute
This is not rendered as \{attr-1}.

This is not an inline attribute definition \{set:attr-2:some other attribute}. +
{attr-2} is not set.

<beginfold id='2'>****</beginfold id='2'>
:inside-a-block: inside a block
Escaping an attribute \{inside-a-block} works too.
<endfold id='2'>****</endfold id='2'>


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Bibliography

<beginfold id='1'>== </beginfold id='1'>Using References

The first reference has no label, so its id <<ref-1>> is rendered.

The second reference has number <<r2>> as label.

The third reference has <<r3>> as label.

A reference definition inside the text instead of the bibliography section yields some strange result: [[[ref-o,outside bibliography]]]].
Not sure what to do with this.

This is trying to use the escaped reference <<r4>>.

This is trying to use reference <<r6>>.


[bibliography]
<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>References

- [[[ref-1]]] This is reference 1.
- [[[r2,2]]]This is reference 2.
- [[[r3,Some Text]]]
This is reference 3.
- [\[[r4, escaped]]] This is #escaped#.
- [[[r5,5]]] This is reference 5.
* [[[r6,strange]]] Using an asterisk yields a strange result.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Block

[abstract]
.Abstract - contiguous block
This document is used for testing syntax highlighting regarding various types of blocks.
E.g. this contiguous abstract block. +
Using block form for the abstract seems to be rendered differently than the section form (see `section.adoc`).

[abstract]
.Abstract - delimited open block
<beginfold id='2'>--</beginfold id='2'>
Using the delimited block form ...

enables having empty lines in the abstract.
<endfold id='2'>--</endfold id='2'>


<beginfold id='1'>== </beginfold id='1'>General

NOTE: Starting and ending delimiter must be balanced, meaning they must have the same length.

.Block title #before# block meta data
[literal]
<beginfold id='2'>....</beginfold id='2'>
Inside the block.
<endfold id='2'>....</endfold id='2'>

[literal]
.Block title `after` block meta data
<beginfold id='2'>....</beginfold id='2'>
Inside the block.
<endfold id='2'>....</endfold id='2'>

.Invalid block name
[ literal]
<beginfold id='2'>....</beginfold id='2'>
This block has invalid meta data as there is a space between the opening square bracket and the block name.
<endfold id='2'>....</endfold id='2'>

.Block with attributes
[literal, some, attributes]
<beginfold id='2'>....</beginfold id='2'>
Inside the block.
<endfold id='2'>....</endfold id='2'>

.Anchor before block name for contiguous block
[[contiguous_block_id_before_name]]
[literal]
Inside the block.

.Anchor after block name for contiguous block
[literal]
[[contiguous_block_id_after_name]]
Inside the block.

.Anchor after block name for delimited block
[literal]
[#delimited_block_id]
<beginfold id='2'>....</beginfold id='2'>
Inside the block.
<endfold id='2'>....</endfold id='2'>

.Option definition
[literal%some-option, some, attributes]
Inside the block.

.Shorthand anchor definition
// TODO Would be nice if we could highligth the shorthand ID definition as such.
[literal#shorthand-id, some, attributes]
Inside the block.

Link to <<contiguous_block_id_before_name>>.

Link to <<contiguous_block_id_after_name>>.

Link to <<shorthand-id>>.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Admonition

See `admonition.adoc`.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Comment

See `comment.adoc`.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Example

.Contiguous
[example]
[[example-block-id]]
A countiguous *example* block.
// some comment
Second line of the example block.

This line is not part of the contiguous example block anymore.

.Delimited with block name
[example]
// some comment
[[example-block-id]]
// some comment
<beginfold id='2'>====</beginfold id='2'>
// some comment
Inside the delimited example block.
<endfold id='2'>====</endfold id='2'>

.Delimited without block name
[[example-block-id]]
<beginfold id='2'>====</beginfold id='2'>
Inside the delimited example block.
<endfold id='2'>====</endfold id='2'>

.Using an open block
[example]
[[example-block-id]]
<beginfold id='2'>--</beginfold id='2'>
Inside the open block example.
<endfold id='2'>--</endfold id='2'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Fenced

NOTE: According to the https://asciidoctor.org/docs/user-manual/#built-in-blocks-summary[Asciidoctor manual], fenced blocks do not support block names.

.Delimited without block name
[#fenced-block-id]
<beginfold id='2'>```</beginfold id='2'>
Inside the fenced block.
The block contents is rendered verbatim.
So there is *no* text formatting.
<endfold id='2'>```</endfold id='2'>

.This is not a fenced block
``````
A fenced block's delimiter length is _exactly_ 3.
``````


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Listing

.Contiguous
[listing]
[[listing-block-id]]
A countiguous *listing* block.
Last line of the listing.

This line is not part of the contiguous block anymore.

.Delimited with block name
[listing]
[[listing-block-id]]
// comment before the opening block delimiter
<beginfold id='3'>////</beginfold id='3'>
block comment
<endfold id='3'>////</endfold id='3'>
<beginfold id='2'>----</beginfold id='2'>
First line inside the *listing* block.
Last line inside the block.
<endfold id='2'>----</endfold id='2'>

.Delimited without block name
[[listing-block-id]]
<beginfold id='2'>----</beginfold id='2'>
Inside the delimited listing block.
<endfold id='2'>----</endfold id='2'>

.Using an open block
[listing]
[[listing-block-id]]
<beginfold id='2'>--</beginfold id='2'>
Inside the open block listing.
<endfold id='2'>--</endfold id='2'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Literal

.Contiguous
[literal]
// some comment
[[literal-block-id]]
// some comment
Inside the contiguous literal block.
// this should not be highlighted as comment
.this should not be highlighted as title
The block contents is rendered verbatim.
So there is *no* text formatting.
// this should not be highlighted as comment

This line is not part of the contiguous block anymore.

.Delimited with block name
[literal]
// some comment
[#literal-block-id]
// some comment
<beginfold id='2'>..........</beginfold id='2'>
Inside the delimited literal block.
// this should not be highlighted as comment
.this should not be highlighted as title
<endfold id='2'>..........</endfold id='2'>

.Delimited without block name
[[literal-block-id]]
// some comment
<beginfold id='2'>..........</beginfold id='2'>
Inside the delimited literal block.
<endfold id='2'>..........</endfold id='2'>

.Using an open block
[literal]
// some comment
[[literal-block-id]]
// some comment
<beginfold id='2'>--</beginfold id='2'>
// this should not be highlighted as comment
Inside the open block listing.
<endfold id='2'>--</endfold id='2'>

.Using leading spaces for first line
    When using some leading spaces, the whole paragraph is treated as literal.
Only the first line needs to have leading spaces.

This line is not part of the literal paragraph anymore.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Open

NOTE: The open block does not have a contiguous form.

.Delimited
[#open-block-id]
<beginfold id='2'>--</beginfold id='2'>
An open block's delimiter length is _exactly_ 2.

Last line of the #open# block.
<endfold id='2'>--</endfold id='2'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Passthrough

.Contiguous
[pass]
[[contiguous-passthrough-id]]
Inside the contiguous passthrough block.
Second line to pass trhough.

This line is not part of the contiguous passthrough block anymore.

.Delimited with block name
[pass]
[[delimited-passthrough-id]]
<beginfold id='2'>++++++</beginfold id='2'>
Inside the delimited passthrough block with block name.
<endfold id='2'>++++++</endfold id='2'>

.Delimited without block name
[[delimited-passthrough-id]]
<beginfold id='2'>++++</beginfold id='2'>
Inside the delimited passthrough block without block name.
<endfold id='2'>++++</endfold id='2'>

According to the https://asciidoctor.org/docs/user-manual/#built-in-blocks-summary[Asciidoctor Manual], passthrough using an open block is not supported.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Quote

See `quote_verse.adoc`.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Sidebar

.Contiguous
[sidebar]
[[sidebar-block-id]]
Inside the *sidebar* block.
Second line of the sidebar block.

This line is not part of the sidbar block anymore.

.Delimited with block name
[sidebar]
[[sidebar-block-id]]
<beginfold id='2'>**********</beginfold id='2'>
Inside the *sidebar* block.
<endfold id='2'>**********</endfold id='2'>

.Delimited without block name
[[sidebar-block-id]]
<beginfold id='2'>****</beginfold id='2'>
Inside the sidebar block.
<endfold id='2'>****</endfold id='2'>

.Using an open block
[sidebar]
[[sidebar-block-id]]
<beginfold id='2'>--</beginfold id='2'>
Inside the sidebar block.
<endfold id='2'>--</endfold id='2'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Source

.Contiguous
[source,ruby]
[[source-block-id]]
#This is Ruby source code.
#NOTE: If there is a space after the `#`, Asciidoctor interprets this as a section title.
#Seems in contiguous source blocks, Asciidoctor still interprets the block contents, which is rather unexpected.
import 'needed'
IO.puts "hello"

.Contiguous using option syntax
[source%mixed,php]
<p>
<?php echo "Hello, World!"; ?>
</p>

.Delimited with block name
[source , ruby ]
[[source-block-id]]
<beginfold id='2'>----</beginfold id='2'>
# This is Ruby source code.
# NOTE: in delimited source blocks, having a space after the `#` in the comment is OK.
import 'needed'

IO.puts "hello"
<endfold id='2'>----</endfold id='2'>

.Delimited with block name using option syntax
[source%mixed,php]
<beginfold id='2'>----</beginfold id='2'>
<p>
<?php echo "Hello, World!"; ?>
</p>
<endfold id='2'>----</endfold id='2'>

.Delimited without block name
[[source-block-id]]
<beginfold id='2'>----</beginfold id='2'>
# This is Ruby source code.
# NOTE: in delimited source blocks, having a space after the `#` in the comment is OK.
import 'needed'

IO.puts "hello"
<endfold id='2'>----</endfold id='2'>

.Using an open block
[source,ruby]
[[source-block-id]]
<beginfold id='2'>--</beginfold id='2'>
import 'needed'

IO.puts "hello"
<endfold id='2'>--</endfold id='2'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Stem

.Contiguous
[stem]
[[stem-block-id]]
Inside the contiguous stem block.
Second line to pass.

This line is not part of the contiguous Passthrough block anymore.

.Delimited with block name
[stem]
[[stem-block-id]]
<beginfold id='2'>++++++</beginfold id='2'>
Inside the delimited stem block with block name.
<endfold id='2'>++++++</endfold id='2'>

.Delimited without block name
[[stem-block-id]]
<beginfold id='2'>++++</beginfold id='2'>
Inside the delimited stem block without block name.
<endfold id='2'>++++</endfold id='2'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Table

See `table.adoc`.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Verse

.Contiguous
[verse]
[[verse-block-id]]
Inside the *verse* block.
Second line of the verse block.

This line is not part of the contiguous verse block anymore.

.Delimited with block name
[verse]
[[verse-block-id]]
<beginfold id='2'>____</beginfold id='2'>
Inside the *verse* block.
<endfold id='2'>____</endfold id='2'>

.Delimited without block name
This would be rendered as a quote block as the same delimiters are used.

.Using an open block
[verse]
[[verse-block-id]]
<beginfold id='2'>--</beginfold id='2'>
Inside the *verse* block.
<endfold id='2'>--</endfold id='2'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Nested Blocks

<beginfold id='2'>====</beginfold id='2'>
Start of outer example block.

.Nested example block
<beginfold id='2'>=====</beginfold id='2'>
Inside the inner example block.
// some comment

.Nested literal block
[literal]
// some comment
<beginfold id='2'>----</beginfold id='2'>
Inside the literal block within the inner example block.
--
Trying to use a block within a verbatim block results in verbatim text, of course.
--
<endfold id='2'>----</endfold id='2'>
<endfold id='2'>=====</endfold id='2'>
Line in outer block.
[listing]
<beginfold id='2'>----</beginfold id='2'>
Inside the inner listing block.
<endfold id='2'>----</endfold id='2'>
End of outer block.
<endfold id='2'>====</endfold id='2'>

.Admonition inside some other block
<beginfold id='2'>====</beginfold id='2'>
Some text.

NOTE: This is a note in simple format inside a block.

Some more text.
<endfold id='2'>====</endfold id='2'>


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Callout
// Add `:icons: font` for nice callout icons.

Callouts are usually used with listing/source blocks, but Asciidoctor renders them also without a listing block.

<1>   This is a callout.
<.> This is a callout too.

 <2> This is not rendered as a callout as it is indented.

The line below is not rendered as a callout as it has no text in the same line.

<3>

<beginfold id='3'>////</beginfold id='3'>
FIXME This should not be highlighted as callout.
As it depends on the kind of line before, this is problematic.
<endfold id='3'>////</endfold id='3'>
The line below is not rendered as callout as it is part of this paragraph.
<4> This should _not_ be highlighted as callout.

.Callouts with manual numbering
[source,sh]
<beginfold id='2'>----</beginfold id='2'>
ls -l  <2>
ls -la  <1>
<endfold id='2'>----</endfold id='2'>
<1> Explanation for callout number 1.
<2>   Explanation for callout number 2.
\<3> This is not a callout as it is escaped.

.Callouts with automatic numbering
[source,sh]
<beginfold id='2'>----</beginfold id='2'>
ls -l  <.>
ls -la  <.>
<endfold id='2'>----</endfold id='2'>
<.> Explanation for callout number 1.
<.> Explanation for callout number 2.


<endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Comment

TIP: Comment highlighting supports the standard https://cgit.kde.org/syntax-highlighting.git/tree/data/syntax/alert.xml[KDE alerts] (TODO, FIXME, ...) in both single-line and multi-line comments.


<beginfold id='1'>== </beginfold id='1'>Single Line

Single-line comments start with exactly `//`.
If there are any characters - including spaces - before the `//`, the line will be rendered.
If there are more than two consecutive `/`, the line will be rendered.

This line // will be rendered completely.

  // This line will be rendered as verbatim text as it is indented.

/// This line will be rendered as it starts with 3 `/`.

// This line will be invisible.

//This line will be invisible.

//

\// Escaped comment.

\// TODO Of course there is no alert highlighting in escaped comments.

.Alerts
// NOTE testing alerts
// TEST: testing alerts
// TODO: testing alerts
// TASK testing alerts
// WARNING: testing alerts
// ALERT: testing alerts
// DANGER: testing alerts


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Multi Line

.Contiguous block
[comment]
Some comment.
Alerts:
NOTE testing alerts
TEST: testing alerts
TODO: testing alerts
TASK testing alerts
WARNING: testing alerts
ALERT: testing alerts
DANGER: testing alerts
Last line of contiguous block comment.

This line is not part of the contiguous block comment anymore.

.Delimited block without name
<beginfold id='3'>//////</beginfold id='3'>
This is a multi-line comment.
It spans multiple lines.

Alerts:
NOTE testing alerts
TEST: testing alerts
TODO: testing alerts
TASK testing alerts
WARNING: testing alerts
ALERT: testing alerts
DANGER: testing alerts

This is the comment's last line.
<endfold id='3'>//////</endfold id='3'>

[comment]
.Delimited block with name
<beginfold id='3'>////</beginfold id='3'>
This is a multi-line comment.
It spans multiple lines.

Alerts:
NOTE testing alerts
TEST: testing alerts
TODO: testing alerts
TASK testing alerts
WARNING: testing alerts
ALERT: testing alerts
DANGER: testing alerts

This is the comment's last line.
<endfold id='3'>////</endfold id='3'>

.Using open block
[comment]
--
Inside the open block comment.
--


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Counter

<beginfold id='1'>== </beginfold id='1'>Use and Render

.Start with 1 and render value
New value for `c1` is {counter:c1}.

.Increment and render
And now it is {counter:c1}.

.Render the current value without changing it
Current value is {c1}.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Use Without Rendering

.Define the new counter
No new value to be {counter2:c2}seen.

.Let's see the current value
Current value is {c2}.

.Increment
No incremented value to be {counter2:c2}seen.

.Let's see the current value
Current value is {c2}.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Using a Start Value

.Start with 3 and render value
New value for `c3` is {counter:c3:99}.

.Increment and render
And now it is {counter:c3}.

.Works with characters too
New value for `c4` is {counter:c4:X}

.Increment character counter and render
And now it is {counter:c4}.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>About using Spaces

CAUTION: If you leave spaces after the `:` or before the closing `}`, Asciidoctor will make them part of the counter attribute name. +
So it's probably wise to avoid spaces here.

.Define a counter
New value is {counter:c5}.

.This is actually a new counter
New value is {counter: c5}.

.But you can't access that attribute
Can't just show the current value { c5}

.Only if we increment it
Incremented value is {counter: c5}.

.This is again a new counter
New value is {counter:  c5}.

.This is also a new counter
New value is {counter:c5 }.

CAUTION: Similar problems occur when using spaces around starting values. +
*Just don't use spaces*.

.New counter with start value
New value is {counter:c6: 9 }

.But when trying to increment
Incremented value is {counter:c6}



<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Text Formatting

TIP: Asciidoctor uses also the term _quoted text_.

<beginfold id='1'>== </beginfold id='1'>Custom Styles

[big]#big text#

Some [.big]#big text#.

Some [big]#big and *strong* text#.

Some text with [foo]#custom style#.

[foo bar]#foo bar text#

before![big]#big text#

[big]#big text#!after

[big]##*text*##

<beginfold id='3'>////</beginfold id='3'>
FIXME Highlighting differs.
The phrase is rendered as marked.
The trailing hash is therefore not visible.
<endfold id='3'>////</endfold id='3'>
[big]###text###

[fo[o]#some text#


[underline]_emphasized and underlined_

[underline]__emphasized and underlined_


[underline]`monospaced and underlined`

[underline]``monospaced and underlined``


[underline]*strong and underlined*

[underline]**strong and underlined**


<beginfold id='1'>=== </beginfold id='1'>Not rendered as custom style

[fo]o]#not a custom style# because of surplus `]`.

[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]#the phrase# because of missing non-word character before clause.

Before [foo]#the phrase#after because of missing non-word character after clause.


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Escaped

This is not \[underline]#underlined text#.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Emphasized

<beginfold id='1'>=== </beginfold id='1'>Rendered formatted

This line contains a _sequence_ of _multiple emphasized_ words.

This line contains a single _emphasized_ word.

This line contains a single __emphasized_ word.

This line contains a single _emphasized__ word.

The text within the brackets should be (_emphasized_), but the brackets themselves not.

(_emphasized_  [_emphasized_  {_emphasized_  |_emphasized_  ._emphasized_  ,_emphasized_  !_emphasized_  ?_emphasized_  _emphasized_?

_emphasized_) _emphasized_] _emphasized_} _emphasized_| _emphasized_. _emphasized_; _emphasized_,

_emphasized_( _emphasized_( _emphasized_[ _emphasized_{

_emphasized_)

_emphasized_

__aa__bb

aa__bb__

aa__bb _cc__dd

aa__bb cc___dd

aa__ bb __cc


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Rendered as-is

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_

// FIXME Highlighting differs.
In this line, there is some ___very emphasized___ text.
Asciidoctor renders it as normal text, just ignoring all the underscores.
That is a bit strange.


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Escaped

Not \_emphasized_ as it is escaped.

Still \__emphasized__ as only the outermost level is escaped.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Marked

<beginfold id='1'>=== </beginfold id='1'>Rendered formatted

Some # marked # text.

Works #also for multiple words#.

Some ##marked# text.

Some #marked## text.

Some ##marked## text.

Some[big]#marked# text.
Not rendered big but marked, because of missing space before `[big]`.

Works also for p##art##s of a word.

p##art#!s

!#marked#!

#marked#

##marked##


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Rendered as-is

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.

  This is #rendered# as a verbatim block as it is indented.

Some [big]#big marked# text.

Some [big]##big marked## text.


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Escaped

Not \#marked# as it is escaped.

Still \##marked## as only the outermost level is escaped.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Monospaced

<beginfold id='1'>=== </beginfold id='1'>Rendered formatted

This line contains a `sequence of ` multiple monospaced` words.

This line contains a single `monospaced` word.

This line contains a single ``monospaced` word.

This line contains a single `monospaced`` word.

The text within the brackets should be (`monospaced`), but the brackets themselves not.

before``monospaced``after.

`monospaced`

(`mono` [`mono` {`mono` |`mono` .`mono` ,`mono` !`mono` ?`mono`

`mono`) `mono`) `mono`] `mono`} `mono`| `mono`. `mono`; `mono`, `mono`?

`mono`( `mono`( `mono`[ `mono`{

``aa``bb

aa``bb``

aa``bb `cc``dd

aa``bb cc```dd

aa`` bb ``cc


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Rendered as-is

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.


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Escaped

Not \`monospaced` as it is escaped.

Still \``monospaced`` as only the outermost level is escaped.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Passthrough

<beginfold id='1'>=== </beginfold id='1'>Rendered passed through

This text is +passed _as_ is+ with no further formatting.

Matching +is _lazy_+, so this + is rendered.

This +_is_ passthrough`+` as passthrough has higher priority as monospaced.

+passthrough+ at line start.

Passthrough at +line end.+

Minimal passthrough +a+.


This text is ++passed _as_ is++ with no further formatting.

This text is +++passed _as_ is+++ with no further formatting.


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Rendered as-is

No+passthrough+ as there is no space before the leading `+`.

No +passthrough+as there is no space after the trailing plus.

No + passthrough+ as there is a space after the leading `+`.

No +passthrough + as there is a space after the trailing plus.


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Escaped

This text \+is _not_ passed through+ because of escaping.

This text \++is _still_ passed through++ as only the outermost level is escaped.

This text \+++is _still_ passed through+++ as only the outermost level is escaped.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Strong

<beginfold id='1'>=== </beginfold id='1'>Rendered formatted

This line contains a *sequence of * multiple strong* words.

This line contains a single **strong* word.

This line contains a single**strong* word.

This line contains a single *strong** word.

The text within the brackets should be (*strong*), but the brackets themselves not.

(*strong* [*strong* {*strong* |*strong* .*strong* ,*strong* !*strong* ?*strong*

*strong*) *strong*] *strong*} *strong*| *strong*. *strong*; *strong*, *strong*?

*strong*( *strong*( *strong*[ *strong*{

*strong*)

*strong*

aa**bb**

**aa**bb

aa**bb**cc

aa**bb *cc**dd

aa**bb cc***dd

aa** bb **cc


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Rendered as-is

This line does _not_ contain *some strong * text as there is a space before the trailing asterisk.

This line does _not_ contain*some strong* text as there is a space missing before the leading asterisk.

This line does _not_ contain *some strong*text as there is a space missing after the trailing asterisk.

some text ;*strong* :*strong* _*strong* }*strong*

some text _*strong*_

;*strong*
:*strong*
}*strong*

 Not *strong* as there is a leading space in the line, making it verbatim.

// FIXME Highlighting differs.
In this line, there is some ***very strong*** text.
It is rendered just ignoring the asterisks.
That is a bit strange.


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Escaped

Not \*strong* as it is escaped.

Still \**strong** as only the outermost level is escaped.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Subscript

<beginfold id='1'>=== </beginfold id='1'>Rendered formatted

H~2~O


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Rendered as-is

Not rendered sub~sc ript~ as there is a space within.


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Escaped

Not \~subscript~ as it is escaped.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Superscript

<beginfold id='1'>=== </beginfold id='1'>Rendered formatted

E = m c^2^


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Rendered as-is

Not rendered super^sc ript^ as there is a space within.


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Escaped

Not \^superscript^ as it is escaped.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Combinations

IMPORTANT: 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.


<beginfold id='1'>=== </beginfold id='1'>Rendered formatted

This is *_strong emphasized_* text.

This is *__strong _ * emphasized_* text.

This is**_strong emphasized_**text.

This is**__ strong emphasized_**text.

*_strong emphasized_*


This is `*strong monospaced*` text.

This is `**strong ` * monospaced*` text.

This is``*strong monospaced*``text.

This is``** strong monospaced*``text.

`*strong monospaced*`


This is `_emphasized monospaced_` text.

This is `__emphasized ` _ monospaced_` text.

This is``_emphasized monospaced_``text.

This is``__ emphasized monospaced_``text.

`_emphasized monospaced_`


This is `*_strong emphasized monospaced_*` text.

This is `*__strong emphasized * ` _ monospaced_*` text.

This is``*_strong emphasized monospaced_*``text.

This is``*__ strong emphasized monospaced_*``text.

`*_strong emphasized monospaced_*`


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Unsupported

Highlighting for other combinations is currently not supported, as there would be a large number of rules and styles necessary.

* _emphasized #marked#_
* #marked *strong*#
* *strong #marked#*
* *strong _emphasized #marked#_*

* subscript _with~in~ emphasized_
* subscript within marked: #H~2~O#
* subscript `with~in~ monospaced`
* subscript *with~in~ strong*

* superscript _with^in^ emphasized_
* superscript within marked: #E = m c^2^#
* superscript `with^in^ monospaced`
* superscript *with^in^ strong*

And even more complex ones.


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Rendered as-is

This is no *_ strong emphasized_* text, it's *strong* only.

This is no *_strong emphasized _* text, it's *strong* only.

This is no _*strong emphasized*_ text, it's _emphasized_ only.

This is no _`emphasized monospaced`_ text, it's _emphasized_ only.


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Escaped

This is not rendered \`_emphasized monospaced_`. +
But it is rendered emphasized.

This is not rendered \*_emphasized strong_*. +
But it is rendered emphasized.

This is not rendered \`*monospaced strong*`. +
But it is rendered strong.

This is not rendered \`*_emphasized monospaced strong_*`. +
But it is rendered emphasized strong.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Horizontal Rules

<beginfold id='1'>== </beginfold id='1'>Simple patterns

'''
---
***


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Patterns with spaces

- - -
* * *

.Not a horizontal rule
' ' '


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Arbitrary length

NOTE: Although the https://asciidoctor.org/docs/user-manual/#markdown-style-horizontal-rules[Asciidoctor Manual] states that horizontal rule patterns are only supporting up to three characters (ignoring the optional spaces), some longer patterns work too.

'''''''

<beginfold id='3'>////</beginfold id='3'>
These patterns don't work, as they start delimited blocks, item lists etc..
--------
******
- - - - - -
* * * * * * * * * 
<endfold id='3'>////</endfold id='3'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Inside blocks

<beginfold id='2'>****</beginfold id='2'>
Horizontal rules work also inside blocks.
They eventually need an empty line before them, though.

'''
After the horizontal rule.
<endfold id='2'>****</endfold id='2'>


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Include
:includedir: include

<beginfold id='1'>== </beginfold id='1'>Included Contents Rendered

IMPORTANT: The include directive is _always_ processed, even within passthrough blocks.

NOTE: Using file names with spaces works.

include::{includedir}/demo.adoc[]

.Partial include
include::{includedir}/demo.adoc[lines=2..3]

.Inside contiguous block
[literal]
This line shall be highlighted as verbatim.
include::{includedir}/demo.adoc[lines=2..3]
This line shall be highlighted as verbatim.

.Inside delimited block with name
[literal]
<beginfold id='2'>----</beginfold id='2'>
This line shall be highlighted as verbatim.
include::{includedir}/demo.adoc[lines=2..3]
This line shall be highlighted as verbatim.
<endfold id='2'>----</endfold id='2'>

.Inside delimited block without name
<beginfold id='2'>....</beginfold id='2'>
This line shall be highlighted as verbatim.
include::{includedir}/demo.adoc[lines=2..3]
This line shall be highlighted as verbatim.
<endfold id='2'>....</endfold id='2'>

.It is also processed within passthrough blocks
[pass]
This line shall be highlighted as passthrough.
include::{includedir}/demo.adoc[lines=2..3]
This line shall be highlighted as passthrough.

[pass]
--
This line shall be highlighted as passthrough.
include::{includedir}/demo.adoc[lines=2..3]
This line shall be highlighted as passthrough.
--

.Inside table
<beginfold id='2'>|===</beginfold id='2'>
|row 1 col 1|row 2 col 2
|
// the include directive must have its own line with nothing else
include::{includedir}/demo.adoc[lines=1..1]
|row 2 col2

|row 3 col 1
|row 3 col 2
<endfold id='2'>|===</endfold id='2'>


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Index

<beginfold id='1'>== </beginfold id='1'>Rendered as Index Term

This is a ((flow)) index term.

This is a indexterm2:[flow] index term.

This is a (((concealed, index, term))) concealed index term.

This is a indexterm:[concealed, index, term] concealed index term.

This is rendered as a ((flow index term))).

This is rendered as a (((flow index term)).

This is ((())) empty but rendered as index term nevertheless.

Some (((index term))).

Some ((((index term)))).


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Rendered as-is

This is (()) not an index term as it is empty.

This is (not an index term)) as there is a `(` missing.

This is ((not an index term) as there is a `)` missing.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Escaped

This is \((not an indexterm)) as it is escaped.

This is \(((not a concealed index term))), 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.


[index]
<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Index Catalog

WARNING: HTML output currently does not support the creation of the index catalog.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Link

<beginfold id='1'>== </beginfold id='1'>ftp, irc

* ftp://some.org/some/where/file.extension
* irc://some.org/some/where/file.extension


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>http(s)

* http://some.org/some/where/file.extension
* https://some.org/some/where/file.extension

// . , ; : followed by a space terminate the link
* https://some.org/some/where/file.extension. some text
* https://some.org/some/where/file.extension.some text
* https://some.org/some/where/file.extension, some text
* https://some.org/some/where/file.extension,some text
* https://some.org/some/where/file.extension; some text
* https://some.org/some/where/file.extension;some text
* https://some.org/some/where/file.extension: some text
* https://some.org/some/where/file.extension some text
* https://some.org/some/where/file.extension:some text

// unbalanced square brackets always terminate the link
* https://some.org/some/where/file.extension[some text
* https://some.org/some/where/file.extension[ some text
* https://some.org/some/where/file.extension]some text
* https://some.org/some/where/file.extension] some text

* https://some.org/some/where/file.extension[]
* https://some.org/some/where/file.extension[some text]trailing text
* https://some.org/some/where/file.extension[some text]. trailing text
* https://some.org/some/where/file.extension[some text], trailing text
* https://some.org/some/where/file.extension[some text]; trailing text
* https://some.org/some/where/file.extension[some text]: trailing text
* https://some.org/some/where/file.extension[some]text] trailing text
* https://some.org/some/where/file.extension[some ]text] trailing text
* https://some.org/some/where/file.extension[some \]text] - with escaped `]`

// TODO: highlighting of text within [] ?
* some text https://some.org/some/where/file.extension[*some text*] trailing text.

// some characters may be placed before the `http`
* (https://some.org
* )https://some.org
* [https://some.org
* ]https://some.org
* ;https://some.org
* <https://some.org
* >https://some.org


<beginfold id='1'>=== </beginfold id='1'>Not rendered as Link

* {https://some.org
* }https://some.org
* ,https://some.org
* .https://some.org
* :https://some.org


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>link

* link:relative/path - not rendered as link as `[]` are misssing
* link:relative/path[]
* ##before##link:relative/path[]##after## - no spaces needed
* link:relative/path/file.extension[local file]
* link:relative/path/file.extension[local ]file]
* link:relative/path/file.extension[local \]file] - with escaped `]`
* link:relative/path with spaces/[] - not rendered as link because of spaces
* link:++relative/path with spaces/++[] - but this is rendered as link with spaces
* link:external.html#anchor[to anchor of local HTML file]
* link:url[optional link text, optional target attribute, optional role attribute]


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>E-Mail

* some.person@org.com
* some.person@org.com[some one] - brackets supported only with leading `mailto:`
* :some.person@org.com - not rendered as link because of leading `:`
* /some.person@org.com - not rendered as link because of leading `/`

* mailto:some.person@org.com - not rendered as link as `[]` are misssing
* mailto:some.person@org.com[]
* ##before##mailto:some.person@org.com[]##after## - no spaces needed
* mailto:some.person@org.com[some one]
* mailto::some.person@org.com[] - not rendered as link because of double `:`
* mailto: some.person@org.com[] - not rendered as mailto because of space after `:`, but still as inline email
* mailto:[some one] - not rendered as link because of missing address


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Escaped

* \ftp://some.org/some/where/file.extension
* \irc://some.org/some/where/file.extension
* \https://some.org/some/where/file.extension
* \link:relative/path[]
* \link:relative/path[]
* \some.person@org.com
* \:some.person@org.com
* \/some.person@org.com
* \mailto:some.person@org.com[]


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= List

<beginfold id='1'>== </beginfold id='1'>Bulleted List

<beginfold id='3'>////</beginfold id='3'>
FIXME The *** without text in the list below should not be highlighted as a horizontal line.
This is going to be problematic, as we would need to know that we are currently inside a list.
<endfold id='3'>////</endfold id='3'>
.using asterisks
* item 1
  * * item 2
Has some text.
** item 2.1
Also has some text.
+
And an additional paragraph.
** item 2.2
*** item 2.2.1
+
Markers without a text are _no_ item.
***
** item 2.3
*** item 2.3.1
**** item 2.3.1.1
* item 3

 * item 4
**    item 4.1
**not an item as there is no space
     ** item 4.2

.using hyphens
- item 1
   - item 2
   -- item 2.1 is not an item as using hyphens is only supported for flat lists

<beginfold id='3'>////</beginfold id='3'>
FIXME: The line above should not be highlighted as literal.
This is going to be problematic, as we would need to know that we are currently inside a list.
<endfold id='3'>////</endfold id='3'>

.inside a block
<beginfold id='2'>****</beginfold id='2'>
* item 1
** item 1.1
<endfold id='2'>****</endfold id='2'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Checklist

<beginfold id='3'>////</beginfold id='3'>
FIXME The invalid checklist items below should not be highlighted as bulleted list items.
This is going to be problematic, as we would need to know that we are currently inside a checklist.
<endfold id='3'>////</endfold id='3'>

.using asterisks
* [*] checked
**  [x]  also checked
*** [x] also checked
* [X]  _invalid_ check (capital X), normal list item
* [o] _invalid_ check (invalid character), normal list item
* [] _invalid_ check (no space), normal list item
* [ ] not checked
*     normal list item

.using hyphens
- [*] checked
- [*] also checked
-- [*] _not a list item_ as hyphens are only supported for flat lists
   -- [*] _not a list item_ as hyphens are only supported for flat lists

<beginfold id='3'>////</beginfold id='3'>
FIXME: the line above should not be highlighted as literal.
This is going to be problematic, as we would need to know that we are currently inside a list.
<endfold id='3'>////</endfold id='3'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Description List

.Normal format
Term normal:: This is a description.
  Term indented:: This works too.

Term multi line::
This one has multiple lines.
Two lines to be exact.
Term L2::: This term is on level 2.
Term L3:::: This term is on level 3.
Term L4::::: This term is on level 4.
Term L5:::::: This term is on level 5.
Term with empty definition::
Term with separated colons   :: This one has spaces before the `::`.
Term no space::This is _not a description item_ as there is no space after the `::`.
Term with unnumbered list::
* list item 1
* list item 2
Term with multiple colons:: in the term:: 
Having multiple `::` in one line is OK too.
.;Strange Term = !?*:: This one has a strange term.
Term 9   : : A space between the double `:` does _not_ work.

<beginfold id='3'>////</beginfold id='3'>
FIXME The line with the "Strange Term" abvoe should not be highlighted as title in this case.
This is going to be problematic, as we would need to know that we are currently inside a list.
<endfold id='3'>////</endfold id='3'>

.Term and description on the same line
[horizontal]
Term 1:: first level.
Term 2::: second level.
Term 3:: first level again.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Numbered List

.using numbers
1. item 1
2. item 2
  3. item 3
4 Is not an item.
Numbers without a trailing dot do _not_ result in an item.
123. This is an item with an out-of-sequence number.
It will be fixed in the rendered output.

.using dots
. item 1
   . item 2
..not an item as there is no space
 .. item 2.1
   .. item 2.2
... item 2.2.1
.... item 2.2.1.1
 . item 3

<beginfold id='3'>////</beginfold id='3'>
FIXME The line above starting with "..not an item" should not be highlighted as title in this case.
This is going to be problematic, as we would need to know that we are currently inside a list.
<endfold id='3'>////</endfold id='3'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Question and Answer List

<beginfold id='3'>////</beginfold id='3'>
FIXME Indented answer is highlighted as verbatim block, messing up further question.
This is going to be problematic, as we would need to know that we are currently inside a list.
<endfold id='3'>////</endfold id='3'>

[qanda]
What is Asciidoctor?::
An implementation of the AsciiDoc processor in Ruby.
Must the answer be indented?::
  It's not necessary, but possibly.
What is the answer to the Ultimate Question?:: 42


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Macro
// for `btn:`, `kbd:`, `menu:`
:experimental:
// for icon:tags[] etc.
:imagesdir: media
// needed to use macro `toc::[]`
:toc: macro

<beginfold id='1'>== </beginfold id='1'>General Information

NOTE: There is no space needed before the macro name or after the closing `]`.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Anchor

There is a macro form anchor:anchor-id[Macro Anchor] for anchor definition.

See `anchor.adoc` for other forms.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Cross Reference

xref:anchor-id[macro xref]

WARNING: 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


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Footnote

This text has a foonotefootnote:[A simple footnote.].

This text has a foonote with idfootnoteref:[fn-1, A footnote reference.].


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Icon

This is a tag icon:tags[] icon with no color set.

This is a blue icon:tags[role="blue"] tag.

This is a big green icon:tags[role="green", size="2x"] tag.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Image

An imageimage:logo-outline-color.svg[Logo,25]within some text.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Keyboard Shortcut

kbd:[Ctrl+M]


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Menu Selection

menu:File[Save]

menu:View[Zoom > 1:1]


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Pass

// TODO Would be nice to highlight the text within the square brackets as passthrough.

Some pass:[<u>passthrough</u>] HTML.

Some pass:quotes[<u>passthrough with *quoted* text</u>] HTML.

Some pass:q[<u>passthrough with *quoted* text</u>] HTML.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Table of Contents

toc::[]


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>UI Buttons

Press the btn:[OK] button when you are finished.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Escaped

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>].


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Media
// The name `imagesdir` is a bit misleading as audio and video use also this prefix.
:imagesdir: media

<beginfold id='1'>== </beginfold id='1'>Audio

audio::test.mp3[]

audio::test.mp3[options="loop"]

.Escaped
\audio::test.mp3[]


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Image

<beginfold id='1'>=== </beginfold id='1'>Block Format

.Test SVG
[#logo]
[link=https://github.com/asciidoctor/brand]
image::test.svg[Test, 100]


<beginfold id='1'>==== </beginfold id='1'>Not highlighted

.leading spaces, literal paragraph
 image::test.svg[Test, 100]

.trailing characters
image::test.svg[Test, 100] trailing


<endfold id='1'></endfold id='1'><beginfold id='1'>==== </beginfold id='1'>Escaped

\image::test.svg[Asciidoctor Logo, 100]


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Inline Format

Withinimage:logo-outline-color.svg[Tree, 25]some text.

NOTE: There is no space needed before `image` and none after the closing `]`.

image:logo-outline-color.svg[Tree, 25] at line start.

At line end image:logo-outline-color.svg[Tree, 25]

(image:logo-outline-color.svg[Tree, 25]) wrapped in non-space characters.


<beginfold id='1'>==== </beginfold id='1'>Not highlighted

image

image:

someimage:

some:image

some image:[]


<endfold id='1'></endfold id='1'><beginfold id='1'>==== </beginfold id='1'>Escaped

Within\image:logo-outline-color.svg[Tree, 25]some text.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Video

video::test.mp4[width=300]

video::test.mp4[width=200, options=loop]

.Escaped
\video::test.mp4[]


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Page break

<beginfold id='1'>== </beginfold id='1'>Rendered as page break

<<<


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Not rendered as page break

.Not a page break as it is indented
 <<<

.Not a page break as it has trailing non-space characters
<<< extra characters

.Escaped
\<<<


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Preprocessor

<beginfold id='1'>== </beginfold id='1'>If Defined

:!attr-1:
ifdef::attr-1[]
This line is _not_ rendered as the attribute is not defined.
endif::[]

:attr-1:
ifdef::attr-1[]
This line _is_ rendered as the attribute is now defined.
endif::[]

.Short form avoiding `endif`
ifdef::attr-1[The attribute `attr-1` is defined]


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>If Not Defined

:!attr-1:
ifndef::some-attribute[]
This line _is_ rendered as it is inside a 'if-not-defined' statement and `some-attribute` is not defined.
endif::some-attribute[]

.Short form avoiding `endif`
ifndef::some-attribute[The attribute `attr-1` is _not_ defined]


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Any (or)

:!attr-1:
:!attr-2:
:attr-3:
ifdef::attr-1,attr-2,attr-3[]
This line is rendered as at least one of the attributes is defined.
endif::[]

:!attr-1:
:!attr-2:
:!attr-3:
ifdef::attr-1,attr-2,attr-3[]
This line is not rendered as none of the attributes is defined.
endif::[]


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>None (nor)

:!attr-1:
:!attr-2:
:!attr-3:
ifndef::attr-1,attr-2,attr-3[]
This line is rendered as none of the attributes is defined.
endif::[]

:!attr-1:
:!attr-2:
:attr-3:
ifndef::attr-1,attr-2,attr-3[]
This line is not rendered as at least one of the attributes is defined.
endif::[]


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>All (and)

:attr-1:
:attr-2:
:attr-3:
ifdef::attr-1+attr-2+attr-3[]
This line is rendered as all the attributes are defined.
endif::[]

:attr-1:
:attr-2:
:!attr-3:
ifndef::attr-1+attr-2+attr-3[]
This line is not rendered as at least one of the attributes is not defined.
endif::[]


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Not All (nand)

:attr-1:
:attr-2:
:!attr-3:
ifndef::attr-1+attr-2+attr-3[]
This line is rendered as at least one of the attributes is defined.
endif::[]

:attr-1:
:attr-2:
:attr-3:
ifndef::attr-1+attr-2+attr-3[]
This line is not rendered as all the attributes are not defined.
endif::[]


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>If Eval

:two: 2
ifeval::[{two} > 1]
This line is rendered as the expression evaluates to true.
endif::[]

:not-true: false
ifeval::[{not-true} == true]
This line is not rendered as the expression evaluates to false.
endif::[]


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Escaped

:!attr-1:
\ifdef::attr-1[]
This line is rendered as the `ifdef`-statement is escaped.
\endif::[]

:!attr-1:
\ifndef::some-attribute[Only if the attribute is not defined]
This line is rendered as the `ifndef`-statement is escaped.
\endif::some-attribute[]

:not-true: false
\ifeval::[{not-true} == true]
This line is rendered as the `ifeval`-statement is escaped.
\endif::[]


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Quote and Verse

<beginfold id='1'>== </beginfold id='1'>Quote

.Contiguous block / paragraph
[quote, attribution, citation title and information]
[[quote-block-id]]
Inside the *contiguous block quote*.
Last line of the quote block.

This line is not part of the contiguous block quote anymore.

.Delimited with block name
[quote, attribution, citation title and information]
[[quote-block-id]]
<beginfold id='2'>____</beginfold id='2'>
Inside the *delimited block quote*.

May contain emtpy lines.
<endfold id='2'>____</endfold id='2'>

.Delimited without block name
[[quote-block-id]]
<beginfold id='2'>____</beginfold id='2'>
Inside the *delimited block quote*.

May contain emtpy lines.
<endfold id='2'>____</endfold id='2'>

.Using an open block
[quote]
[[quote-block-id]]
<beginfold id='2'>--</beginfold id='2'>
Inside the *open block quote*.
<endfold id='2'>--</endfold id='2'>

.Nested block quote
[quote, outer attribution, outer citation title and information]
[[quote-block-id]]
<beginfold id='2'>____</beginfold id='2'>
First line of outer quote.
[quote, inner attribution, inner citation title and information]
[[quote-block-id]]
<beginfold id='2'>______</beginfold id='2'>
Inside the inner quote.
<endfold id='2'>______</endfold id='2'>
Last line of outer quote.
<endfold id='2'>____</endfold id='2'>

// Currently no specific highlighting supported.
.Quoted paragraph
"Inside the *quoted paragraph*.
As being a paragraph, no empty lines are supported."
-- attribution, citation title and information


.Air quote
[,attribution, citation title and information]
<beginfold id='2'>"" </beginfold id='2'>
Inside the *air quote*.

Supports empty lines.
<endfold id='2'>""</endfold id='2'>
 
// Currently no specific highlighting supported.
.Markdown style
> Inside the *markdown quote*.
> 
> May contain emtpy lines.
> -- attribution, citation title and information

// Currently no specific highlighting supported.
.Nested markdown style
> Start of outer quote.
>
> > Some inner quote.
>
> * can use AsciiDoc ...
> * inside markdown block
>
> > Another inner quote.
>
> End of outer quote.


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Verse

.Contiguous block / paragraph
[verse, attribution, citation title and information]
[[verse-block-id]]
Inside the *contiguous block verse*.
Second line of the verse block.

This line is not part of the contiguous verse block anymore.

.Delimited block with name
[verse, attribution, citation title and information]
[[verse-block-id]]
<beginfold id='2'>____</beginfold id='2'>
Inside the *delimited block verse*.

Supports empty lines.
<endfold id='2'>____</endfold id='2'>

.Delimited block without name
This would be rendered as a quote block as the same delimiters are used.

.Using an open block
[verse, attribution, citation title and information]
[[verse-block-id]]
<beginfold id='2'>--</beginfold id='2'>
Inside the *open block verse*.
<endfold id='2'>--</endfold id='2'>


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Replacement

TIP: See also the https://asciidoctor.org/docs/user-manual/#replacements[corresponding section] in the Asciidoctor manual.


<beginfold id='1'>== </beginfold id='1'>Textual symbol replacements

<beginfold id='2'>|===</beginfold id='2'>
|Name |Syntax |Escaped

|copyright |(C) |\(C)
|registered |(R) |\(R)
|trademark |(TM) |\(TM)

|apostrophe |KDE's |KDE\'s
|ellipses |... |\... footnote:[Escaping has no effect]
|m dash |-- |\-- footnote:[Escaping yields another different dash]

|left single arrow |<- |\<-
|right single arrow |-> |\->
|left double arrow |<= |\<=
|right double arrow |=> |\=>
<endfold id='2'>|===</endfold id='2'>


<beginfold id='1'>=== </beginfold id='1'>Not replaced

// Single apostrophe must be surrounded by alphabetic characters.
* a'
* 'a
* .'.
* a'.
* .'a


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Numerical Character Reference

<beginfold id='1'>=== </beginfold id='1'>Decimal

&#0167;

##before##&#0167;##after##

&#167;


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Hexadecimal

&#x00A7;

##before##&#x00A7;##after##

&#xA7;


<endfold id='1'></endfold id='1'><beginfold id='1'>=== </beginfold id='1'>Escaped

\&#0167;
\&#167;
\&#x00A7;
\&#xA7;


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>HTML/XML Character Entity References

See e.g. https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references[Wikipedia].

IMPORTANT: Highlighting of HTML/XML character entity references is _not_ supported.
There are just too many of them.

// some examples
<beginfold id='2'>====</beginfold id='2'>
&ne;
&equiv;
<endfold id='2'>====</endfold id='2'>


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Section L0

[abstract]
<beginfold id='1'>== </beginfold id='1'>Abstract

This document is used for testing various aspects of syntax highlighting regarding sections.

:title-attribute: with attribute

<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Section L1

<beginfold id='1'>=== </beginfold id='1'>Section L2

<beginfold id='1'>==== </beginfold id='1'>Section L3

<beginfold id='1'>===== </beginfold id='1'>Section L4

<beginfold id='1'>====== </beginfold id='1'>Section L5

======= This is not a new section

The level would be too deep.
Only sections up to level 5 (having 6 leading `=`) are supported.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>#### </beginfold id='1'>Section L3

Using Markdown section syntax works too.

=#=# This is not a section.
Use either `=` or `#`, but not mixed.


<beginfold id='1'>===== </beginfold id='1'>[[id-1]] [[id-2]] Section L4

This section has leading additional achors.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>==== </beginfold id='1'>Section L3 [[id-1]][[id-2]]

This section has trailing additional anchors.


<endfold id='1'></endfold id='1'><beginfold id='1'>==== </beginfold id='1'>[[id-1]][[id-2]]Section L3[[id-3]][[id-4]]

This section has both leading and trailing additional anchors.


<endfold id='1'></endfold id='1'><beginfold id='1'>==== </beginfold id='1'>Section L3 {title-attribute} in Title

.Title {title-attribute}
This section has an attribute in its title.


[discrete]
<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Discrete Section

This section will not be shown in the table of contents.

<beginfold id='3'>////</beginfold id='3'>
== Section with _emphasized_ text

=== Section with escaped \_emphasized_ text
<endfold id='3'>////</endfold id='3'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Section with #marked# text

<beginfold id='1'>=== </beginfold id='1'>Section with escaped \#marked# text


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Section with `monospaced` text

<beginfold id='1'>=== </beginfold id='1'>Section with escaped \`monospaced` text

<beginfold id='3'>////</beginfold id='3'>
== Section with *strong* text

=== Section with escaped \*strong* text
<endfold id='3'>////</endfold id='3'>


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Another Section at Level 0

Some text in the second level 0 section.

<beginfold id='1'>== </beginfold id='1'>Section 2.1

Some text.


<endfold id='1'></endfold id='1'><endfold id='1'></endfold id='1'><beginfold id='1'></beginfold id='1'>= Table

<beginfold id='1'>== </beginfold id='1'>Default Separator

.PSV
// some comment
[[table-1]]
[.some-role]
[#table-shorthand]
// some comment
<beginfold id='2'>|===</beginfold id='2'>
// some comment
| header col 1           |      header col 2   | header col 3
// some comment

// with escaped cell separator
| row 1 \| col 1 | row 1 col 2 | row 1 col 3
// no spaces needed around `|`
| *row* 2 col 1|row 2 col 2|row 2 col 3

|row 3 col 1
// using attribute
| row 3 col 2 {vbar}
|ro3 3 col 3

| row 4 col 1 a|some AsciiDoc in col 2 row 4

* item 1
* item 2
|row 4 col 3

2*| row 5 has same contents in first 2 columns
|row 5 col 3

|row 6 col 1 2+| span row 6 in col 2 and 3

.2+|span col 1 in row 6 and 7|row 6 col 2|row 6 col 3
|row 7 col 2|row 7 col 3

2.2+^.^|span col 1 and 2 in row 8 and 9|row 8 col 3
|row 9 col 3

e|row 10 col 1 is emphasized (italic)
s|row 10 col 2 is strong (bold)
m|row 10 col 3 is monospaced
<endfold id='2'>|===</endfold id='2'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Custom Separator

IMPORTANT: Highlighting of tables with custom separator is not supported.
All `|` inside the table will be falsly highlighted.

[separator=!]
<beginfold id='2'>|===</beginfold id='2'>
// the `|` in the line below should not be highlighted.
!row 1 | col 1 !row 1 col 2
s!row 2 col 1 !row 2 col 2
<endfold id='2'>|===</endfold id='2'>

[separator=a]
<beginfold id='2'>|===</beginfold id='2'>
arow 1 col 1 arow 1 col 2
sarow 2 col 1 arow 2 col 2
<endfold id='2'>|===</endfold id='2'>


<endfold id='1'></endfold id='1'><beginfold id='1'>== </beginfold id='1'>Delimiter-Separated Values

IMPORTANT: Highlighting for tables with delimiter-separated values is not supported.
All `|` inside the table will be falsly highlighted.

[format=csv]
<beginfold id='2'>|===</beginfold id='2'>
Col 1 ,Col 2 ,Col 3

// the `|` in the line below should not be highlighted.
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
<endfold id='2'>|===</endfold id='2'>


<beginfold id='1'>=== </beginfold id='1'>Shorthand Notation for Data Tables

.CSV
,===
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
,===

.DSV
:===
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
:===


