AsciiDoc mapping
How markup-asciidoc-writer maps model elements to AsciiDoc source text. The writer produces AsciiDoc source text; rendering it is the job of downstream AsciiDoc tooling.
Document structure
-
A non-blank document title is written as
= Titleon its own line. -
Top-level blocks are separated by one blank line (also between the title and the first block).
-
Inside a section, one blank line precedes every child block.
article(title) { } writes the title as the = document title and starts sections at ==, following AsciiDoc convention. The title-less form article { } starts sections at = instead.
Block mapping
| Model element | Produced AsciiDoc | Notes |
|---|---|---|
|
[#id] == Title |
|
|
the text followed by a newline |
no wrapping or escaping is applied |
|
[source,kotlin] ---- code ---- |
|
|
[#id] .Title [link=url] image::path[alt,120,300] |
|
|
. first .. nested * bullet |
|
|
[#id] .Title |=== ... |
|
Table mapping
Produced by the standalone Table writer and by TableBlock inside documents:
-
The table is fenced by
|===lines. -
Header cells are written inline on one line:
|name|value. -
Each body row writes one
| cellline per cell; rows are separated by a blank line (also between the header and the first row). -
A headerless table gets a synthesized
[cols="1,1,…"]line before the opening fence, with one1per column; the column count is the maximum cell count across header and rows.
Example — table with a header:
|===
|name|value
| answer
| 42
|===
Headerless, two columns:
[cols="1,1"]
|===
| a
| b
|===
See also
-
Writer API contract — the four output forms
-
Markdown (GFM) mapping — the same model in Markdown