{
"provenance": {
"source": "twig — hand-authored, NOT vendored",
"authored_by": "scripts/build-asciidoc-corpus.py (regenerate with it; do not edit this file by hand)",
"why": "The official AsciiDoc TCK is 1.0.0-alpha.0 with 13 cases and is not growing; the normative spec covers six pages; and no implementation emits an ASG to generate expectations from (Asciidoctor has no inline AST at all). These expectations are therefore twig's own reading of the AsciiDoc Language documentation, not a third party's authored test suite — a weaker authority than testdata/asciidoc-tck-corpus.json next door, which stays the normative ratchet.",
"validated_against": "asg-schema.json — the official ASG JSON Schema (https://schemas.asciidoc.org/asg/1-0-0/draft-01), vendored from gitlab.eclipse.org/eclipse/asciidoc-lang/asciidoc-lang @ cf4674c019b387fbb6d609a39a28ebf9f20db8e0. Every case here is checked against it at generation time, so node names, variants, forms and required fields are the WG's, not twig's.",
"format": "Identical to asciidoc-tck-corpus.json's, so conformance.zig runs both through one path and any case here can be exported as a TCK -input.adoc/-output.json pair (--export-tck) and offered upstream.",
"license": "EPL-2.0, matching the AsciiDoc TCK's, so cases can be contributed upstream unchanged.",
"counts": {
"cases": 66,
"block": 47,
"inline": 19
}
},
"cases": [
{
"id": "block/paragraph/leading-blank-lines",
"level": "block",
"adoc": "\n\nbody\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
],
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
],
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 4
}
]
},
"note": "A document's location starts at its first block, not at line 1: leading blank lines are not part of any node."
},
{
"id": "block/paragraph/trailing-blank-lines",
"level": "block",
"adoc": "body\n\n\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 4
}
]
}
},
{
"id": "block/paragraph/no-trailing-newline",
"level": "block",
"adoc": "body",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 4
}
]
},
"note": "A file with no final newline parses identically to one with it; the terminating newline is not part of the paragraph's location."
},
{
"id": "block/paragraph/three-lines",
"level": "block",
"adoc": "one\ntwo\nthree\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "one\ntwo\nthree",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 5
}
]
},
"note": "A hard-wrapped paragraph is ONE text node whose value carries the interior newlines verbatim — the TCK's block/paragraph/multiple-lines establishes this for two lines; nothing changes at three."
},
{
"id": "block/paragraph/indented-continuation",
"level": "block",
"adoc": "one\n two\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "one\n two",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 5
}
]
},
"note": "Only the FIRST line of a block decides its form, so an indented second line continues the paragraph rather than opening a literal block (docs/modules/verbatim/pages/literal-blocks.adoc)."
},
{
"id": "block/section/nested-levels",
"level": "block",
"adoc": "== One\n\n=== Two\n\nbody\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "section",
"type": "block",
"title": [
{
"name": "text",
"type": "string",
"value": "One",
"location": [
{
"line": 1,
"col": 4
},
{
"line": 1,
"col": 6
}
]
}
],
"level": 1,
"blocks": [
{
"name": "section",
"type": "block",
"title": [
{
"name": "text",
"type": "string",
"value": "Two",
"location": [
{
"line": 3,
"col": 5
},
{
"line": 3,
"col": 7
}
]
}
],
"level": 2,
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 5,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 5,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 3,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
},
{
"id": "block/section/sibling-sections",
"level": "block",
"adoc": "== One\n\n== Two\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "section",
"type": "block",
"title": [
{
"name": "text",
"type": "string",
"value": "One",
"location": [
{
"line": 1,
"col": 4
},
{
"line": 1,
"col": 6
}
]
}
],
"level": 1,
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 6
}
]
},
{
"name": "section",
"type": "block",
"title": [
{
"name": "text",
"type": "string",
"value": "Two",
"location": [
{
"line": 3,
"col": 4
},
{
"line": 3,
"col": 6
}
]
}
],
"level": 1,
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 6
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 6
}
]
},
"note": "A section with no body has no `blocks` key at all, and its location ends at its own title."
},
{
"id": "block/section/level-skip",
"level": "block",
"adoc": "== One\n\n==== Deep\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "section",
"type": "block",
"title": [
{
"name": "text",
"type": "string",
"value": "One",
"location": [
{
"line": 1,
"col": 4
},
{
"line": 1,
"col": 6
}
]
}
],
"level": 1,
"blocks": [
{
"name": "section",
"type": "block",
"title": [
{
"name": "text",
"type": "string",
"value": "Deep",
"location": [
{
"line": 3,
"col": 6
},
{
"line": 3,
"col": 9
}
]
}
],
"level": 3,
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 9
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 9
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 9
}
]
},
"note": "An AsciiDoc section's level is spelled directly by its marker, so a skipped level nests rather than being renumbered. Asciidoctor warns about this and still nests it; the ASG has no place to record the warning, so the tree is all that is asserted here."
},
{
"id": "block/section/body-before-first-section",
"level": "block",
"adoc": "intro\n\n== One\n\nbody\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "intro",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
},
{
"name": "section",
"type": "block",
"title": [
{
"name": "text",
"type": "string",
"value": "One",
"location": [
{
"line": 3,
"col": 4
},
{
"line": 3,
"col": 6
}
]
}
],
"level": 1,
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 5,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 5,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 3,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
},
{
"id": "block/section/closes-back-to-shallower",
"level": "block",
"adoc": "== One\n\n=== Two\n\n== Three\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "section",
"type": "block",
"title": [
{
"name": "text",
"type": "string",
"value": "One",
"location": [
{
"line": 1,
"col": 4
},
{
"line": 1,
"col": 6
}
]
}
],
"level": 1,
"blocks": [
{
"name": "section",
"type": "block",
"title": [
{
"name": "text",
"type": "string",
"value": "Two",
"location": [
{
"line": 3,
"col": 5
},
{
"line": 3,
"col": 7
}
]
}
],
"level": 2,
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 7
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 7
}
]
},
{
"name": "section",
"type": "block",
"title": [
{
"name": "text",
"type": "string",
"value": "Three",
"location": [
{
"line": 5,
"col": 4
},
{
"line": 5,
"col": 8
}
]
}
],
"level": 1,
"location": [
{
"line": 5,
"col": 1
},
{
"line": 5,
"col": 8
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 8
}
]
}
},
{
"id": "block/header/title-only",
"level": "block",
"adoc": "= Title\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"attributes": {},
"header": {
"title": [
{
"name": "text",
"type": "string",
"value": "Title",
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 7
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 7
}
]
},
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 7
}
]
}
},
{
"id": "block/header/attribute-entry-unset",
"level": "block",
"adoc": "= Title\n:!toc:\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"attributes": {
"toc": null
},
"header": {
"title": [
{
"name": "text",
"type": "string",
"value": "Title",
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 7
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 6
}
]
},
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 6
}
]
},
"note": "`:!name:` UNSETS an attribute. The schema's document `attributes` map allows a null value precisely for this; an unset entry is not the same as `:name:` with an empty value."
},
{
"id": "block/header/attribute-entry-padded-value",
"level": "block",
"adoc": "= Title\n:name: spaced value\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"attributes": {
"name": "spaced value"
},
"header": {
"title": [
{
"name": "text",
"type": "string",
"value": "Title",
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 7
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 21
}
]
},
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 21
}
]
},
"note": "The value is trimmed of surrounding whitespace but not internally (docs/modules/attributes/pages/attribute-entries.adoc)."
},
{
"id": "block/header/blank-line-ends-header",
"level": "block",
"adoc": "= Title\n\n:not-an-entry: value\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"attributes": {},
"header": {
"title": [
{
"name": "text",
"type": "string",
"value": "Title",
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 7
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 7
}
]
},
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": ":not-an-entry: value",
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 20
}
]
}
],
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 20
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 20
}
]
},
"note": "A blank line closes the header, so what follows is body — an attribute entry below it is a paragraph, not an entry. (Asciidoctor does hoist body-level entries into the attribute table; the ASG models the document TREE, and the line is a paragraph in it.)"
},
{
"id": "block/header/title-not-at-line-one",
"level": "block",
"adoc": "body\n\n= Not A Title\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 4
}
]
},
{
"name": "section",
"type": "block",
"title": [
{
"name": "text",
"type": "string",
"value": "Not A Title",
"location": [
{
"line": 3,
"col": 3
},
{
"line": 3,
"col": 13
}
]
}
],
"level": 0,
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 13
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 13
}
]
},
"note": "A level-0 title below the header is a level-0 SECTION (a part title), not a second document title."
},
{
"id": "block/list/unordered/multiple-items",
"level": "block",
"adoc": "* one\n* two\n* three\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "list",
"type": "block",
"marker": "*",
"variant": "unordered",
"items": [
{
"name": "listItem",
"type": "block",
"marker": "*",
"principal": [
{
"name": "text",
"type": "string",
"value": "one",
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
},
{
"name": "listItem",
"type": "block",
"marker": "*",
"principal": [
{
"name": "text",
"type": "string",
"value": "two",
"location": [
{
"line": 2,
"col": 3
},
{
"line": 2,
"col": 5
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 5
}
]
},
{
"name": "listItem",
"type": "block",
"marker": "*",
"principal": [
{
"name": "text",
"type": "string",
"value": "three",
"location": [
{
"line": 3,
"col": 3
},
{
"line": 3,
"col": 7
}
]
}
],
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 7
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 7
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 7
}
]
}
},
{
"id": "block/list/unordered/dash-marker",
"level": "block",
"adoc": "- one\n- two\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "list",
"type": "block",
"marker": "-",
"variant": "unordered",
"items": [
{
"name": "listItem",
"type": "block",
"marker": "-",
"principal": [
{
"name": "text",
"type": "string",
"value": "one",
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
},
{
"name": "listItem",
"type": "block",
"marker": "-",
"principal": [
{
"name": "text",
"type": "string",
"value": "two",
"location": [
{
"line": 2,
"col": 3
},
{
"line": 2,
"col": 5
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 5
}
]
},
"note": "The marker is carried as written; `-` and `*` are the same unordered variant with different markers."
},
{
"id": "block/list/unordered/blank-line-between-items",
"level": "block",
"adoc": "* one\n\n* two\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "list",
"type": "block",
"marker": "*",
"variant": "unordered",
"items": [
{
"name": "listItem",
"type": "block",
"marker": "*",
"principal": [
{
"name": "text",
"type": "string",
"value": "one",
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
},
{
"name": "listItem",
"type": "block",
"marker": "*",
"principal": [
{
"name": "text",
"type": "string",
"value": "two",
"location": [
{
"line": 3,
"col": 3
},
{
"line": 3,
"col": 5
}
]
}
],
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 5
}
]
},
"note": "A single blank line between items does NOT end the list (docs/modules/lists/pages/build-a-list.adoc); it only makes the list loose, which the ASG does not record."
},
{
"id": "block/list/unordered/paragraph-after-list",
"level": "block",
"adoc": "* one\n\nbody\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "list",
"type": "block",
"marker": "*",
"variant": "unordered",
"items": [
{
"name": "listItem",
"type": "block",
"marker": "*",
"principal": [
{
"name": "text",
"type": "string",
"value": "one",
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
},
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
],
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
},
{
"id": "block/list/unordered/marker-change-starts-new-list",
"level": "block",
"adoc": "* one\n- two\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "list",
"type": "block",
"marker": "*",
"variant": "unordered",
"items": [
{
"name": "listItem",
"type": "block",
"marker": "*",
"principal": [
{
"name": "text",
"type": "string",
"value": "one",
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
},
{
"name": "list",
"type": "block",
"marker": "-",
"variant": "unordered",
"items": [
{
"name": "listItem",
"type": "block",
"marker": "-",
"principal": [
{
"name": "text",
"type": "string",
"value": "two",
"location": [
{
"line": 2,
"col": 3
},
{
"line": 2,
"col": 5
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 5
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 5
}
]
},
"note": "A different marker character at the same level begins a sibling list rather than continuing the first (docs/modules/lists/pages/unordered.adoc — 'to nest, change the marker'). Asciidoctor instead NESTS the second list; twig follows the documentation's flat reading, which is also what the ASG's `marker` field per list implies."
},
{
"id": "block/list/unordered/wrapped-principal-text",
"level": "block",
"adoc": "* one\n continued\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "list",
"type": "block",
"marker": "*",
"variant": "unordered",
"items": [
{
"name": "listItem",
"type": "block",
"marker": "*",
"principal": [
{
"name": "text",
"type": "string",
"value": "one\n continued",
"location": [
{
"line": 1,
"col": 3
},
{
"line": 2,
"col": 11
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 11
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 11
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 11
}
]
},
"note": "An item's principal text continues onto following indented lines, newlines and indentation preserved verbatim, exactly as a hard-wrapped paragraph's are."
},
{
"id": "block/listing/empty",
"level": "block",
"adoc": "----\n----\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "listing",
"type": "block",
"form": "delimited",
"delimiter": "----",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 4
}
]
},
"note": "An empty listing block has no `inlines` at all (the schema defaults it to []), not a text node with an empty value."
},
{
"id": "block/listing/blank-lines-inside",
"level": "block",
"adoc": "----\none\n\ntwo\n----\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "listing",
"type": "block",
"form": "delimited",
"delimiter": "----",
"inlines": [
{
"name": "text",
"type": "string",
"value": "one\n\ntwo",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 4,
"col": 3
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 4
}
]
},
"note": "A blank line inside a delimited block is content, not a separator."
},
{
"id": "block/listing/longer-delimiter",
"level": "block",
"adoc": "-----\nbody\n-----\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "listing",
"type": "block",
"form": "delimited",
"delimiter": "-----",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 5
}
]
},
"note": "A delimiter line is four or more of its character; the closing line must match the opening one exactly, so `delimiter` is carried as written."
},
{
"id": "block/listing/markup-not-interpreted",
"level": "block",
"adoc": "----\n*not strong*\n----\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "listing",
"type": "block",
"form": "delimited",
"delimiter": "----",
"inlines": [
{
"name": "text",
"type": "string",
"value": "*not strong*",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 12
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
},
{
"id": "block/sidebar/containing-paragraphs",
"level": "block",
"adoc": "****\none\n\ntwo\n****\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "sidebar",
"type": "block",
"form": "delimited",
"delimiter": "****",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "one",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 3
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 3
}
]
},
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "two",
"location": [
{
"line": 4,
"col": 1
},
{
"line": 4,
"col": 3
}
]
}
],
"location": [
{
"line": 4,
"col": 1
},
{
"line": 4,
"col": 3
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
},
{
"id": "block/sidebar/empty",
"level": "block",
"adoc": "****\n****\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "sidebar",
"type": "block",
"form": "delimited",
"delimiter": "****",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
},
{
"id": "block/break/thematic",
"level": "block",
"adoc": "before\n\n'''\n\nafter\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "before",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 6
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 6
}
]
},
{
"name": "break",
"type": "block",
"variant": "thematic",
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 3
}
]
},
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "after",
"location": [
{
"line": 5,
"col": 1
},
{
"line": 5,
"col": 5
}
]
}
],
"location": [
{
"line": 5,
"col": 1
},
{
"line": 5,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 5
}
]
}
},
{
"id": "block/break/page",
"level": "block",
"adoc": "before\n\n<<<\n\nafter\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "before",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 6
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 6
}
]
},
{
"name": "break",
"type": "block",
"variant": "page",
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 3
}
]
},
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "after",
"location": [
{
"line": 5,
"col": 1
},
{
"line": 5,
"col": 5
}
]
}
],
"location": [
{
"line": 5,
"col": 1
},
{
"line": 5,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 5
}
]
}
},
{
"id": "block/break/thematic-interrupts-paragraph",
"level": "block",
"adoc": "before\n'''\nafter\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "before",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 6
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 6
}
]
},
{
"name": "break",
"type": "block",
"variant": "thematic",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 3
}
]
},
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "after",
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 5
}
]
}
],
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 5
}
]
},
"note": "A break needs no blank line around it: it interrupts a paragraph the way any block-start line does."
},
{
"id": "block/example/containing-paragraph",
"level": "block",
"adoc": "====\nbody\n====\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "example",
"type": "block",
"form": "delimited",
"delimiter": "====",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
},
{
"id": "block/open/containing-paragraph",
"level": "block",
"adoc": "--\nbody\n--\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "open",
"type": "block",
"form": "delimited",
"delimiter": "--",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 2
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 2
}
]
},
"note": "The open block is the one delimiter that is EXACTLY two characters rather than four or more (sdr-001-open-block-delimiter)."
},
{
"id": "block/quote/containing-paragraph",
"level": "block",
"adoc": "____\nbody\n____\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "quote",
"type": "block",
"form": "delimited",
"delimiter": "____",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
},
{
"id": "block/literal/multiple-lines",
"level": "block",
"adoc": "....\none\n two\n....\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "literal",
"type": "block",
"form": "delimited",
"delimiter": "....",
"inlines": [
{
"name": "text",
"type": "string",
"value": "one\n two",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 3,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 4,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 4,
"col": 4
}
]
},
"note": "A literal block keeps its interior verbatim, indentation included, exactly as a listing block does — the two differ only in what a renderer does with the text, which the ASG records as the block's name rather than in its content."
},
{
"id": "block/pass/multiple-lines",
"level": "block",
"adoc": "++++\n<hr>\n++++\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "pass",
"type": "block",
"form": "delimited",
"delimiter": "++++",
"inlines": [
{
"name": "text",
"type": "string",
"value": "<hr>",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
},
{
"id": "block/example/nested-blocks",
"level": "block",
"adoc": "====\n* one\n\nbody\n====\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "example",
"type": "block",
"form": "delimited",
"delimiter": "====",
"blocks": [
{
"name": "list",
"type": "block",
"marker": "*",
"variant": "unordered",
"items": [
{
"name": "listItem",
"type": "block",
"marker": "*",
"principal": [
{
"name": "text",
"type": "string",
"value": "one",
"location": [
{
"line": 2,
"col": 3
},
{
"line": 2,
"col": 5
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 5
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 5
}
]
},
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 4,
"col": 1
},
{
"line": 4,
"col": 4
}
]
}
],
"location": [
{
"line": 4,
"col": 1
},
{
"line": 4,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
},
{
"id": "block/sidebar/nested-delimited-block",
"level": "block",
"adoc": "****\n====\nbody\n====\n****\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "sidebar",
"type": "block",
"form": "delimited",
"delimiter": "****",
"blocks": [
{
"name": "example",
"type": "block",
"form": "delimited",
"delimiter": "====",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
],
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 4,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
},
{
"id": "block/listing/unclosed",
"level": "block",
"adoc": "----\nbody\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "listing",
"type": "block",
"form": "delimited",
"delimiter": "----",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 2,
"col": 4
}
]
},
"note": "An unclosed delimited block runs to the end of its container. Asciidoctor warns and does the same; the ASG has nowhere to record the warning, so the block simply ends at its last content line — the only reading that keeps every location inside the source."
},
{
"id": "block/listing/mismatched-delimiter-does-not-close",
"level": "block",
"adoc": "----\n---\nbody\n----\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "listing",
"type": "block",
"form": "delimited",
"delimiter": "----",
"inlines": [
{
"name": "text",
"type": "string",
"value": "---\nbody",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 3,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 4,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 4,
"col": 4
}
]
},
"note": "A closing delimiter must match the opening one character for character, so a shorter run is content."
},
{
"id": "block/comment/line",
"level": "block",
"adoc": "// hidden\nbody\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 4
}
]
}
],
"location": [
{
"line": 2,
"col": 1
},
{
"line": 2,
"col": 4
}
]
},
"note": "A line comment yields nothing, and the document therefore starts at the paragraph below it rather than at line 1."
},
{
"id": "block/comment/line-interrupts-paragraph",
"level": "block",
"adoc": "one\n// hidden\ntwo\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "one",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 3
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 3
}
]
},
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "two",
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 3
}
]
}
],
"location": [
{
"line": 3,
"col": 1
},
{
"line": 3,
"col": 3
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 3,
"col": 3
}
]
},
"note": "Asciidoctor treats a comment line inside a paragraph as a line-level interruption that does NOT split the paragraph; twig splits it, because the ASG's paragraph carries ONE text node whose location must map back to real source, and a value with the comment line spliced out could not."
},
{
"id": "block/comment/block",
"level": "block",
"adoc": "////\nhidden\nmore\n////\nbody\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "body",
"location": [
{
"line": 5,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 5,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
],
"location": [
{
"line": 5,
"col": 1
},
{
"line": 5,
"col": 4
}
]
}
},
{
"id": "block/paragraph/strong-span-mid-line",
"level": "block",
"adoc": "one *two* three\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "one ",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 4
}
]
},
{
"name": "span",
"type": "inline",
"variant": "strong",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "two",
"location": [
{
"line": 1,
"col": 6
},
{
"line": 1,
"col": 8
}
]
}
],
"location": [
{
"line": 1,
"col": 5
},
{
"line": 1,
"col": 9
}
]
},
{
"name": "text",
"type": "string",
"value": " three",
"location": [
{
"line": 1,
"col": 10
},
{
"line": 1,
"col": 15
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 15
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 15
}
]
}
},
{
"id": "block/paragraph/strong-span-whole-line",
"level": "block",
"adoc": "*all of it*\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "span",
"type": "inline",
"variant": "strong",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "all of it",
"location": [
{
"line": 1,
"col": 2
},
{
"line": 1,
"col": 10
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 11
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 11
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 11
}
]
}
},
{
"id": "inline/span/strong/not-constrained-by-word-character",
"level": "inline",
"adoc": "a*b*c\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "a*b*c",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
}
],
"note": "A constrained span's opening delimiter may not follow a word character, so this is plain text (spec strong-span.adoc)."
},
{
"id": "inline/span/strong/space-after-opening-delimiter",
"level": "inline",
"adoc": "* not a span*\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "* not a span*",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 13
}
]
}
],
"note": "A constrained opening delimiter may not be followed by whitespace. At block level this line would be a list item; as an inline-level case it is text."
},
{
"id": "inline/span/strong/two-spans",
"level": "inline",
"adoc": "*one* and *two*\n",
"config": null,
"asg": [
{
"name": "span",
"type": "inline",
"variant": "strong",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "one",
"location": [
{
"line": 1,
"col": 2
},
{
"line": 1,
"col": 4
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
},
{
"name": "text",
"type": "string",
"value": " and ",
"location": [
{
"line": 1,
"col": 6
},
{
"line": 1,
"col": 10
}
]
},
{
"name": "span",
"type": "inline",
"variant": "strong",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "two",
"location": [
{
"line": 1,
"col": 12
},
{
"line": 1,
"col": 14
}
]
}
],
"location": [
{
"line": 1,
"col": 11
},
{
"line": 1,
"col": 15
}
]
}
]
},
{
"id": "inline/span/strong/unterminated",
"level": "inline",
"adoc": "*not closed\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "*not closed",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 11
}
]
}
]
},
{
"id": "inline/no-markup/multiple-words",
"level": "inline",
"adoc": "two words\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "two words",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 9
}
]
}
]
},
{
"id": "block/paragraph/emphasis-span-mid-line",
"level": "block",
"adoc": "one _two_ three\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "one ",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 4
}
]
},
{
"name": "span",
"type": "inline",
"variant": "emphasis",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "two",
"location": [
{
"line": 1,
"col": 6
},
{
"line": 1,
"col": 8
}
]
}
],
"location": [
{
"line": 1,
"col": 5
},
{
"line": 1,
"col": 9
}
]
},
{
"name": "text",
"type": "string",
"value": " three",
"location": [
{
"line": 1,
"col": 10
},
{
"line": 1,
"col": 15
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 15
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 15
}
]
}
},
{
"id": "inline/span/emphasis/not-constrained-by-word-character",
"level": "inline",
"adoc": "a_b_c\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "a_b_c",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
}
]
},
{
"id": "inline/span/emphasis/unterminated",
"level": "inline",
"adoc": "_not closed\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "_not closed",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 11
}
]
}
]
},
{
"id": "block/paragraph/monospace-span-mid-line",
"level": "block",
"adoc": "one `two` three\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "one ",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 4
}
]
},
{
"name": "span",
"type": "inline",
"variant": "code",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "two",
"location": [
{
"line": 1,
"col": 6
},
{
"line": 1,
"col": 8
}
]
}
],
"location": [
{
"line": 1,
"col": 5
},
{
"line": 1,
"col": 9
}
]
},
{
"name": "text",
"type": "string",
"value": " three",
"location": [
{
"line": 1,
"col": 10
},
{
"line": 1,
"col": 15
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 15
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 15
}
]
},
"note": "A monospace span decodes to twig's own `text_leaf` verbatim leaf rather than a nested mark (see asg.zig's doc comment), but the ASG shape asserted here is the ordinary `span`/`code` one — that choice is invisible at this level."
},
{
"id": "inline/span/code/not-constrained-by-word-character",
"level": "inline",
"adoc": "a`b`c\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "a`b`c",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
}
]
},
{
"id": "inline/span/code/unterminated",
"level": "inline",
"adoc": "`not closed\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "`not closed",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 11
}
]
}
]
},
{
"id": "block/paragraph/mark-span-mid-line",
"level": "block",
"adoc": "one #two# three\n",
"config": null,
"asg": {
"name": "document",
"type": "block",
"blocks": [
{
"name": "paragraph",
"type": "block",
"inlines": [
{
"name": "text",
"type": "string",
"value": "one ",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 4
}
]
},
{
"name": "span",
"type": "inline",
"variant": "mark",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "two",
"location": [
{
"line": 1,
"col": 6
},
{
"line": 1,
"col": 8
}
]
}
],
"location": [
{
"line": 1,
"col": 5
},
{
"line": 1,
"col": 9
}
]
},
{
"name": "text",
"type": "string",
"value": " three",
"location": [
{
"line": 1,
"col": 10
},
{
"line": 1,
"col": 15
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 15
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 15
}
]
}
},
{
"id": "inline/span/mark/not-constrained-by-word-character",
"level": "inline",
"adoc": "a#b#c\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "a#b#c",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 5
}
]
}
]
},
{
"id": "inline/span/mark/unterminated",
"level": "inline",
"adoc": "#not closed\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "#not closed",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 11
}
]
}
]
},
{
"id": "inline/span/four-constrained-spans-in-one-line",
"level": "inline",
"adoc": "*bold* _emphasis_ `mono` #mark#\n",
"config": null,
"asg": [
{
"name": "span",
"type": "inline",
"variant": "strong",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "bold",
"location": [
{
"line": 1,
"col": 2
},
{
"line": 1,
"col": 5
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 6
}
]
},
{
"name": "text",
"type": "string",
"value": " ",
"location": [
{
"line": 1,
"col": 7
},
{
"line": 1,
"col": 7
}
]
},
{
"name": "span",
"type": "inline",
"variant": "emphasis",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "emphasis",
"location": [
{
"line": 1,
"col": 9
},
{
"line": 1,
"col": 16
}
]
}
],
"location": [
{
"line": 1,
"col": 8
},
{
"line": 1,
"col": 17
}
]
},
{
"name": "text",
"type": "string",
"value": " ",
"location": [
{
"line": 1,
"col": 18
},
{
"line": 1,
"col": 18
}
]
},
{
"name": "span",
"type": "inline",
"variant": "code",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "mono",
"location": [
{
"line": 1,
"col": 20
},
{
"line": 1,
"col": 23
}
]
}
],
"location": [
{
"line": 1,
"col": 19
},
{
"line": 1,
"col": 24
}
]
},
{
"name": "text",
"type": "string",
"value": " ",
"location": [
{
"line": 1,
"col": 25
},
{
"line": 1,
"col": 25
}
]
},
{
"name": "span",
"type": "inline",
"variant": "mark",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "mark",
"location": [
{
"line": 1,
"col": 27
},
{
"line": 1,
"col": 30
}
]
}
],
"location": [
{
"line": 1,
"col": 26
},
{
"line": 1,
"col": 31
}
]
}
],
"note": "The four single-character constrained spans dispatch off the same byte-scan loop in parser.zig; this checks it doesn't confuse one delimiter for another mid-line."
},
{
"id": "inline/span/strong/unconstrained",
"level": "inline",
"adoc": "a **bold** word\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "a ",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 2
}
]
},
{
"name": "span",
"type": "inline",
"variant": "strong",
"form": "unconstrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "bold",
"location": [
{
"line": 1,
"col": 5
},
{
"line": 1,
"col": 8
}
]
}
],
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 10
}
]
},
{
"name": "text",
"type": "string",
"value": " word",
"location": [
{
"line": 1,
"col": 11
},
{
"line": 1,
"col": 15
}
]
}
]
},
{
"id": "inline/span/emphasis/unconstrained",
"level": "inline",
"adoc": "a __ital__ word\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "a ",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 2
}
]
},
{
"name": "span",
"type": "inline",
"variant": "emphasis",
"form": "unconstrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "ital",
"location": [
{
"line": 1,
"col": 5
},
{
"line": 1,
"col": 8
}
]
}
],
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 10
}
]
},
{
"name": "text",
"type": "string",
"value": " word",
"location": [
{
"line": 1,
"col": 11
},
{
"line": 1,
"col": 15
}
]
}
]
},
{
"id": "inline/span/code/unconstrained",
"level": "inline",
"adoc": "a ``mono`` word\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "a ",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 2
}
]
},
{
"name": "span",
"type": "inline",
"variant": "code",
"form": "unconstrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "mono",
"location": [
{
"line": 1,
"col": 5
},
{
"line": 1,
"col": 8
}
]
}
],
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 10
}
]
},
{
"name": "text",
"type": "string",
"value": " word",
"location": [
{
"line": 1,
"col": 11
},
{
"line": 1,
"col": 15
}
]
}
]
},
{
"id": "inline/span/mark/unconstrained",
"level": "inline",
"adoc": "a ##hi## word\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "a ",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 2
}
]
},
{
"name": "span",
"type": "inline",
"variant": "mark",
"form": "unconstrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "hi",
"location": [
{
"line": 1,
"col": 5
},
{
"line": 1,
"col": 6
}
]
}
],
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 8
}
]
},
{
"name": "text",
"type": "string",
"value": " word",
"location": [
{
"line": 1,
"col": 9
},
{
"line": 1,
"col": 13
}
]
}
]
},
{
"id": "inline/span/strong/unconstrained-intraword",
"level": "inline",
"adoc": "sub**string**here\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "sub",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 3
}
]
},
{
"name": "span",
"type": "inline",
"variant": "strong",
"form": "unconstrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "string",
"location": [
{
"line": 1,
"col": 6
},
{
"line": 1,
"col": 11
}
]
}
],
"location": [
{
"line": 1,
"col": 4
},
{
"line": 1,
"col": 13
}
]
},
{
"name": "text",
"type": "string",
"value": "here",
"location": [
{
"line": 1,
"col": 14
},
{
"line": 1,
"col": 17
}
]
}
],
"note": "The reason the unconstrained form exists: no word-boundary rule applies, so a span can open and close mid-word. The constrained form refuses exactly this (see inline/span/strong/not-constrained-by-word-character)."
},
{
"id": "inline/span/strong/unconstrained-nests-constrained",
"level": "inline",
"adoc": "**bold _and_ more**\n",
"config": null,
"asg": [
{
"name": "span",
"type": "inline",
"variant": "strong",
"form": "unconstrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "bold ",
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 7
}
]
},
{
"name": "span",
"type": "inline",
"variant": "emphasis",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "and",
"location": [
{
"line": 1,
"col": 9
},
{
"line": 1,
"col": 11
}
]
}
],
"location": [
{
"line": 1,
"col": 8
},
{
"line": 1,
"col": 12
}
]
},
{
"name": "text",
"type": "string",
"value": " more",
"location": [
{
"line": 1,
"col": 13
},
{
"line": 1,
"col": 17
}
]
}
],
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 19
}
]
}
]
},
{
"id": "inline/span/strong/doubled-opener-without-doubled-close",
"level": "inline",
"adoc": "a **bold* word\n",
"config": null,
"asg": [
{
"name": "text",
"type": "string",
"value": "a ",
"location": [
{
"line": 1,
"col": 1
},
{
"line": 1,
"col": 2
}
]
},
{
"name": "span",
"type": "inline",
"variant": "strong",
"form": "constrained",
"inlines": [
{
"name": "text",
"type": "string",
"value": "*bold",
"location": [
{
"line": 1,
"col": 4
},
{
"line": 1,
"col": 8
}
]
}
],
"location": [
{
"line": 1,
"col": 3
},
{
"line": 1,
"col": 9
}
]
},
{
"name": "text",
"type": "string",
"value": " word",
"location": [
{
"line": 1,
"col": 10
},
{
"line": 1,
"col": 14
}
]
}
],
"note": "A doubled opener with no doubled close falls THROUGH to the constrained scan rather than going literal — asciidoctor's own ordering, where the constrained pattern's interior is `*bold`."
}
]
}