Skip to content

Containers, quotes and fences ​

Divs, block quotes, code and comment fences: nesting, lazy continuation, absorption and what closes what.

Generated from resources/examples/edge-cases/, resources/examples/core.md and resources/examples/extensions.md - edit the cases there, not here. Each case links the conformance fixture it produces.

Invalid named-container metadata keeps the subtree ​

2 conformance fixtures

A recognized fence and kind word keep their container when the remaining opener metadata is invalid. Report fence-title-syntax, drop all opener metadata, and parse the children as blocks (carve#2693). This applies to unknown kinds as well as core admonitions and extension containers. It does not make a bare title valid syntax.

carve
:::: outer
::: widget Custom Title
# Heading

- first
- second
:::
::::
After.
html
<div class="outer">
  <div class="widget">
    <h1 id="Heading">Heading</h1>
    <ul>
      <li>first</li>
      <li>second</li>
    </ul>
  </div>
</div>
<p>After.</p>

Malformed quoted titles and labels follow the same recovery. The invalid metadata does not become a visible title or a label.

carve
::: note "Unclosed
Body one.
:::

::: widget [Unclosed
Body two.
:::
html
<aside class="admonition note" aria-label="Note">
  <p>Body one.</p>
</aside>
<div class="widget">
  <p>Body two.</p>
</div>

Non-row pipe keeps lazy plus in an unclosed div ​

1 conformance fixture

An open paragraph inside the div keeps the flush-left line in the item and div.

carve
- a
  ::: box
  | x | y | Ω
+ c
html
<ul>
  <li>a
    <div class="box">
      <p>| x | y | Ω
+ c</p>
    </div>
  </li>
</ul>

A fence with no host prefix leaves an inline run ​

2 conformance fixtures

A fence opener inside a list item owns no flush-left body line. The closing backticks then open an unclosed fence after the document paragraph.

carve
- ```
x
```
html
<ul>
  <li>
    <pre><code></code></pre>
  </li>
</ul>
<p>x</p>
<pre><code></code></pre>
carve
- ```
y
```
html
<ul>
  <li>
    <pre><code></code></pre>
  </li>
</ul>
<p>y</p>
<pre><code></code></pre>

Fenced code shorter inner fence ​

1 conformance fixture

A code-fence closer must use the same character and be at least as long as the opener — a shorter run inside is literal content.

carve
```
line
``
still code
```
html
<pre><code>line
``
still code
</code></pre>

Blockquote caption after a blank line ​

1 conformance fixture

One blank line is allowed between a block and its ^ caption; the quote becomes a <figure> with a <figcaption>.

carve
> quote text

^ Source: Someone
html
<figure>
  <blockquote><p>quote text</p></blockquote>
  <figcaption>Source: Someone</figcaption>
</figure>

Opaque spans inside a container ​

6 conformance fixtures

A container collects its body by scanning for its closer. A code fence, a raw block and a comment block are opaque: their contents are content, not markup, so a colon fence written inside one closes nothing. This is what lets a document about Carve show a container fence at all - under exact-length closers the code fence is the only structural way to quote one.

carve
::: note
```
:::
```
body
:::
after
html
<aside class="admonition note" aria-label="Note">
  <pre><code>:::
</code></pre>
  <p>body</p>
</aside>
<p>after</p>

The opener carrying no info string is the case that hides the bug: the opener line is closer-shaped itself, so an implementation that tests it before consuming it ends the span where it began (carve#450). A tilde fence behaves the same.

carve
::: note
~~~
:::
~~~
body
:::
after
html
<aside class="admonition note" aria-label="Note">
  <pre><code>:::
</code></pre>
  <p>body</p>
</aside>
<p>after</p>

A container opener inside the span is content too. Under exact-length closers this one is load-bearing: read as markup it would push a nesting level and put every following closer one level off.

carve
::: note
```text
::: tip
```
body
:::
after
html
<aside class="admonition note" aria-label="Note">
  <pre><code class="language-text">::: tip
</code></pre>
  <p>body</p>
</aside>
<p>after</p>

A comment block is opaque in the same way. It renders nothing at all, so what this pins is where the container ends.

carve
::: note
%%%
:::
%%%
body
:::
after
html
<aside class="admonition note" aria-label="Note">
  <p>body</p>
</aside>
<p>after</p>

An unclosed code fence is opaque too: it runs to the end of its container, so the ::: and after below render inside the code block and the admonition closes at end of input. A %%% opener with no exact-width closer is different: it opens no span and is a line comment.

carve
::: note
```
x
:::
after
html
<aside class="admonition note" aria-label="Note">
  <pre><code>x
:::
after
</code></pre>
</aside>

Alone, or as the whole content of a blockquote, an unterminated fence opens a code block that runs to the end the same way.

carve
> ```
html
<blockquote>
  <pre><code></code></pre>
</blockquote>

Inside an unclosed fence only the innermost container's closer is structural ​

8 conformance fixtures

A code fence with no closer runs to the end of its container. Every colon line after it is fence content, whatever its width, and that includes the closer of the container it sits in: no closer closes anything there and no run opens anything. A fence that closes stays opaque to every colon line inside it (PART 2, A CLOSER IS REQUIRED).

carve
::: outer
:::: inner
```
code
:::
::::
:::
after *b*
html
<div class="outer">
  <div class="inner">
    <pre><code>code
:::
::::
:::
after *b*
</code></pre>
  </div>
</div>
carve
:::: outer
::: inner
```
code
::::
:::
::::
after *b*
html
<div class="outer">
  <div class="inner">
    <pre><code>code
::::
:::
::::
after *b*
</code></pre>
  </div>
</div>
carve
::: note
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>
carve
::: outer
:::: inner
```
code
:::
```
::::
:::
after *b*
html
<div class="outer">
  <div class="inner">
    <pre><code>code
:::
</code></pre>
  </div>
</div>
<p>after <strong>b</strong></p>

A comment line above the fence changes nothing: the fence still runs to the end, in one container or nested.

carve
::: note
%% c
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>
carve
::: outer
:::: inner
%% c
```
code
:::
::::
:::
after *b*
html
<div class="outer">
  <div class="inner">
    <pre><code>code
:::
::::
:::
after *b*
</code></pre>
  </div>
</div>

Nor does a quote or an item whose only content is a comment:

carve
::: note
> %% c
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote>

  </blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>
carve
::: note
- %% c
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li></li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

An unclosed fence under an open paragraph in a container opens nothing ​

3 conformance fixtures

A code fence with no closer still interrupts an open paragraph (PART 9 §10 I4), and that holds inside a container too: the fence ends the paragraph, a quote's or an item's included, and opens a code block. Unclosed, it runs to the end of its container, so every colon line below it is payload and the note closes at end of input.

carve
::: note
para
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <p>para</p>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

The paragraph can be a quote's, continued lazily:

carve
::: note
> quote
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote><p>quote</p></blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

or a list item's:

carve
::: note
- item
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li>item</li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

An unclosed fence after an attribute line in a container ends at its closer ​

4 conformance fixtures

A block-attribute line is not paragraph text, so an unclosed fence below it opens at a block start. It runs to the end of its container: every colon line after it, the innermost container's own closer included, is code. The attribute floats onto the code block (PART 9 §15).

carve
::: note
{#x}
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <pre id="x"><code>code
::::
:::
after *b*
</code></pre>
</aside>

Nested, no container's closer ends the fence:

carve
::: outer
:::: inner
{.c}
```
code
:::
::::
:::
after *b*
html
<div class="outer">
  <div class="inner">
    <pre class="c"><code>code
:::
::::
:::
after *b*
</code></pre>
  </div>
</div>

A quote or an item whose only content is an attribute line leaves no paragraph open either:

carve
::: note
> {#x}
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote>

  </blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>
carve
::: note
- {#x}
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li></li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

A quoted comment or attribute line closes the quote's paragraph ​

3 conformance fixtures

A comment or a block-attribute line inside a quote closes the quoted paragraph, as it does outside one. An unclosed fence on the next line misses the quote and opens in the note, where it runs to the end, the note's own closer included:

carve
::: note
> para
> %% c
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote><p>para</p></blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>
carve
::: note
> para
> {#x}
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote><p>para</p></blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

Quoted text keeps the paragraph open, and the fence line interrupts it all the same:

carve
::: note
> para
> more text
```
code
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote><p>para
more text</p></blockquote>
  <pre><code>code
:::
after *b*
</code></pre>
</aside>

An unclosed fence under a multi-line quote paragraph in a container opens nothing ​

2 conformance fixtures

A quote paragraph that runs over several quoted lines is still open at the fence line, and the fence interrupts it (PART 9 §10 I4). Every quoted line carries paragraph text, so none of them closes the paragraph above it. The colon lines below are payload of the unclosed fence, as in the one-line case.

carve
::: note
> para
> more
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote><p>para
more</p></blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>
carve
::: note
> a
> b
> c
> d
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote><p>a
b
c
d</p></blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

A table row or a definition under a paragraph ends it before an unclosed fence ​

4 conformance fixtures

A valid table row (PART 9 §10 I1) and a reference definition (I5) close the paragraph above them, bare or inside a quote. An unclosed fence on the next line opens in the note and runs to its end, so ::::, the note's own closer and after *b* are fence content:

carve
::: note
para
| t |
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <p>para</p>
  <table>
    <tbody>
      <tr><td>t</td></tr>
    </tbody>
  </table>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

The same holds for a quoted table row:

carve
::: note
> para
> | t |
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote>
    <p>para</p>
    <table>
      <tbody>
        <tr><td>t</td></tr>
      </tbody>
    </table>
  </blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

and for a quoted link definition, which renders nothing:

carve
::: note
> para
> [r]: /u
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote><p>para</p></blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

A pipe line without a closing pipe is not a table row (T2), so the quoted paragraph stays open, and the fence line interrupts it:

carve
::: note
> para
> | t
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote><p>para
| t</p></blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

A block at an item content column ends its paragraph before an unclosed fence ​

8 conformance fixtures

A link or footnote definition at a list item's content column ends the item's paragraph (CARVE-P0-005), and so does any other block there (CARVE-P0-011). The unclosed fence on the next line misses the item, so the item closes and the fence opens in the note, where it runs to the end: ::::, the note's own closer and after *b* are fence content:

carve
::: note
- para
  [r]: /u
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li>para</li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

A footnote definition does the same:

A footnote body takes a lazy line like every container (markup-carve/carve#3885), but a fence line interrupts instead of folding, so it ends the note and the item and opens in the admonition:

carve
::: note
- para
  [^f]: n
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li>para</li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

A definition at an outer item's content column also ends the paragraph of the sub-item above it (CARVE-P0-020):

carve
::: note
- a
  - para
  [r]: /u
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li>a
      <ul>
        <li>para</li>
      </ul>
    </li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

A valid table row at the content column (PART 9 §10 I1) is a block there, bare or in a quoted item:

carve
::: note
- para
  | t |
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li>para
      <table>
        <tbody>
          <tr><td>t</td></tr>
        </tbody>
      </table>
    </li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>
carve
::: note
> - para
>   | t |
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote>
    <ul>
      <li>para
        <table>
          <tbody>
            <tr><td>t</td></tr>
          </tbody>
        </table>
      </li>
    </ul>
  </blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

An attribute line and a heading at the content column leave no paragraph open either:

carve
::: note
- para
  {#x}
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li>para</li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>
carve
::: note
- para
  # H
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li>para
      <h1 id="H">H</h1>
    </li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

One column short of the content column, the row misses the item and opens a table in the note; the fence below it runs to the end:

carve
::: note
10. para
   | t |
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ol start="10">
    <li>para</li>
  </ol>
  <table>
    <tbody>
      <tr><td>t</td></tr>
    </tbody>
  </table>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

A definition or attribute line in a nested container leaves no paragraph for an unmarked line ​

15 conformance fixtures

Since markup-carve/carve#4860 a list marker opens a list in a list item, description body or footnote body and closes a body it misses, so the rows below that show a marker in such a body read that way.

A footnote definition is the exception in this section: its body holds the note's own paragraph, and a footnote body takes a lazy line like every container (markup-carve/carve#3885), so in the footnote rows the unmarked line folds into the note.

A definition or attribute line at a sub-item's content column ends the sub-item's paragraph and leaves none open anywhere in the stack (CARVE-P0-005, CARVE-P0-011), so a line at document column 0 leaves the list instead of folding into the outer item:

carve
- a
  - para
    [r]: /u
x
html
<ul>
  <li>a
    <ul>
      <li>para
x</li>
    </ul>
  </li>
</ul>

An attribute line at that column does the same:

carve
- a
  - para
    {#x}
x
html
<ul>
  <li>a
    <ul>
      <li>para</li>
    </ul>
  </li>
</ul>
<p>x</p>

A footnote body takes a lazy line like every container (markup-carve/carve#3885), so x folds into the note's paragraph:

carve
- a[^f]
  - para
    [^f]: n
      more
x
html
<ul>
  <li>a<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a>
    <ul>
      <li>para</li>
    </ul>
  </li>
</ul>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>n
more
x<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

Inside a quote, a footnote definition at the item's content column leaves no open paragraph either. The unmarked tail cannot be a lazy line, so it leaves the quote:

carve
> - para
>   [^f]: n
tail
html
<blockquote>
  <ul>
    <li>para</li>
  </ul>
</blockquote>

The same holds in a nested quote:

carve
> > - para
> >   [^f]: n
tail
html
<blockquote>
  <blockquote>
    <ul>
      <li>para</li>
    </ul>
  </blockquote>
</blockquote>

An unclosed fence in place of tail opens at document level, under an ordered item too:

carve
> 1. para
>    [^f]: n
```
code
html
<blockquote>
  <ol>
    <li>para</li>
  </ol>
</blockquote>
<pre><code>code
</code></pre>

In a quoted definition body:

carve
> :: t
> : d
>   [^f]: n
tail
html
<blockquote>
  <dl>
    <dt>t</dt>
    <dd>d</dd>
  </dl>
</blockquote>

Under a quoted sub-item the line reaches neither item's paragraph, since the quote is reached only by its marker:

carve
> - a
>   - para
>     [^f]: n
tail
html
<blockquote>
  <ul>
    <li>a
      <ul>
        <li>para</li>
      </ul>
    </li>
  </ul>
</blockquote>

A list marker leaves the quote too, and opens a list:

carve
> - para
>   [^f]: n
- tail
html
<blockquote>
  <ul>
    <li>para</li>
  </ul>
</blockquote>
<ul>
  <li>tail</li>
</ul>

An attribute line at an ordered item's column in a quote ends it the same way:

carve
> 1. para
>    {#x}
tail
html
<blockquote>
  <ol>
    <li>para</li>
  </ol>
</blockquote>
<p>tail</p>

With the quote inside an item, the definition is erased with its > (carve#5129), so a column-0 line folds into the open paragraph:

carve
- > - para
  >   [r]: /u
tail
html
<ul>
  <li>
    <blockquote>
      <ul>
        <li>para
tail</li>
      </ul>
    </blockquote>
  </li>
</ul>

An attribute line in the same position is not erased, so a column-0 line reaches the document past both containers:

carve
- > - para
  >   {#x}
tail
html
<ul>
  <li>
    <blockquote>
      <ul>
        <li>para</li>
      </ul>
    </blockquote>
  </li>
</ul>
<p>tail</p>

A footnote definition under a quoted paragraph:

carve
- > para
  > [^f]: n
tail
html
<ul>
  <li>
    <blockquote><p>para</p></blockquote>
  </li>
</ul>

A line at the outer item's content column ends the quote and opens the item's next paragraph:

carve
- > - para
  >   [^f]: n
  tail
html
<ul>
  <li>
    <blockquote>
      <ul>
        <li>para</li>
      </ul>
    </blockquote>
  </li>
</ul>

An abbreviation definition inside a quote is erased with its > like a link definition (CARVE-P12-026, carve#5129), so tail folds into the item:

carve
> - para
>   *[A]: b
tail
html
<blockquote>
  <ul>
    <li>para
tail</li>
  </ul>
</blockquote>

A quoted item comment ends the quote before an unclosed fence ​

3 conformance fixtures

An item line under an item's paragraph starts the next item, so a comment or attribute item closes that paragraph inside a quote too. No paragraph is then open for the unquoted fence line to continue, so the quote ends, the fence opens in the note's body, and it runs to the end, the note's own closer included:

carve
::: note
> - para
> - %% c
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote>
    <ul>
      <li>para</li>
      <li></li>
    </ul>
  </blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

and for an attribute item:

carve
::: note
> - para
> - {#x}
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote>
    <ul>
      <li>para</li>
      <li></li>
    </ul>
  </blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

Under a quoted plain paragraph the item line is lazy text, so the paragraph stays open, and the fence line interrupts it:

carve
::: note
> para
> - %% c
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote><p>para
-</p></blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

A line past a body's column is read in the body, and a quote does not rebase ​

14 conformance fixtures

Since markup-carve/carve#4860 a list marker opens a list in a list item, description body or footnote body and closes a body it misses, so the rows below that show a marker in such a body read that way.

A list-shaped line under a description body's open paragraph folds into it (PART 9 §10 I2) and opens no item, so a definition past the body's content column is read in the body: it registers and ends the paragraph (CARVE-P0-020, ruled on carve#3279). With no paragraph left open, x is a document paragraph (CARVE-P0-011):

carve
:: t
: d
  - para
    [r]: /u
x

[r][]
html
<dl>
  <dt>t</dt>
  <dd>
    <p>d</p>
    <ul>
      <li>para
x</li>
    </ul>
  </dd>
</dl>
<p><a href="/u">r</a></p>

An ordered marker folds the same way:

carve
:: t
: d
  1. para
     [r]: /u
x

[r][]
html
<dl>
  <dt>t</dt>
  <dd>
    <p>d</p>
    <ol>
      <li>para
x</li>
    </ol>
  </dd>
</dl>
<p><a href="/u">r</a></p>

A footnote body is the same host:

carve
[^n]: d
  - para
    [r]: /u
x

[r][] [^n]
html
<p><a href="/u">r</a> <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>d</p>
      <ul>
        <li>para
x</li>
      </ul>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A line at the body's column after the definition opens the body's second paragraph:

carve
:: t
: d
  - para
    [r]: /u
  more

[r][]
html
<dl>
  <dt>t</dt>
  <dd>
    <p>d</p>
    <ul>
      <li>para
more</li>
    </ul>
  </dd>
</dl>
<p><a href="/u">r</a></p>

A heading past the body's column opens on its authored base (CARVE-P0-024), and x leaves the body (CARVE-P0-012):

carve
:: t
: d
  - para
    # H
x
html
<dl>
  <dt>t</dt>
  <dd>
    <p>d</p>
    <ul>
      <li>para
        <h1 id="H">H</h1>
      </li>
    </ul>
  </dd>
</dl>
<p>x</p>

An attribute line past the column closes the paragraph and attaches nothing:

carve
:: t
: d
  - para
    {#k}
x
html
<dl>
  <dt>t</dt>
  <dd>
    <p>d</p>
    <ul>
      <li>para</li>
    </ul>
  </dd>
</dl>
<p>x</p>

An abbreviation definition reads as any definition does (CARVE-P12-026), so x leaves the description:

carve
:: t
: d
  - para
    *[A]: b
x
html
<dl>
  <dt>t</dt>
  <dd>
    <p>d</p>
    <ul>
      <li>para
x</li>
    </ul>
  </dd>
</dl>

A block quote does not rebase (CARVE-P0-024). A definition one column past the quote marker is erased with its > (carve#5129), so the quoted paragraph stays open for tail (carve#3280):

carve
- > para
  >  [r]: /u
tail

[r][]
html
<ul>
  <li>
    <blockquote><p>para
tail</p></blockquote>
  </li>
</ul>
<p><a href="/u">r</a></p>

The footnote spelling is text as well:

A footnote body takes a lazy line like every container (markup-carve/carve#3885), so the unmarked line below folds into the note:

carve
- > para
  >  [^f]: n
tail
html
<ul>
  <li>
    <blockquote><p>para</p></blockquote>
  </li>
</ul>

So is an attribute line:

carve
- > para
  >  {#x}
tail
html
<ul>
  <li>
    <blockquote><p>para</p></blockquote>
  </li>
</ul>
<p>tail</p>

Inside an outer quote the inner quote's paragraph still takes tail:

carve
> - > para
>   >  [r]: /u
tail

[r][]
html
<blockquote>
  <ul>
    <li>
      <blockquote><p>para
tail</p></blockquote>
    </li>
  </ul>
</blockquote>
<p><a href="/u">r</a></p>

At a quoted description body's content column a definition is erased with its > (carve#5129), so the unmarked tail folds into the body:

carve
> :: t
> : d
>   [r]: /u
tail
html
<blockquote>
  <dl>
    <dt>t</dt>
    <dd>d
tail</dd>
  </dl>
</blockquote>

An attribute line there is not erased: it leaves no paragraph open (CARVE-P0-011), so tail leaves the quote:

carve
> :: t
> : d
>   {#x}
tail
html
<blockquote>
  <dl>
    <dt>t</dt>
    <dd>d</dd>
  </dl>
</blockquote>
<p>tail</p>

So does a heading (CARVE-P0-012):

carve
> :: t
> : d
>   # H
tail
html
<blockquote>
  <dl>
    <dt>t</dt>
    <dd>
      <p>d</p>
      <h1 id="H">H</h1>
    </dd>
  </dl>
</blockquote>
<p>tail</p>

A line is read in the container whose column it reaches ​

26 conformance fixtures

Since markup-carve/carve#4860 a list marker opens a list in a list item, description body or footnote body and closes a body it misses, so the rows below that show a marker in such a body read that way.

A marker at the item column opens a list (PART 0 S2).

carve
- :: t
  : para
  - li
html
<ul>
  <li>
    <dl>
      <dt>t</dt>
      <dd>para</dd>
    </dl>
    <ul>
      <li>li</li>
    </ul>
  </li>
</ul>

A marked quoted continuation keeps its claim (PART 0 S2).

carve
- > para
  > more
%% c
x
html
<ul>
  <li>
    <blockquote><p>para
more
x</p></blockquote>
  </li>
</ul>

A note on a description marker line keeps its body column, two past where it is written (DEFINITION EXTENT).

carve
x[^c]

:: t
: [^c]: para
    # H
html
<p>x<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<dl>
  <dt>t</dt>
  <dd></dd>
</dl>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>para</p>
      <h1 id="H">H</h1>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A footnote body takes a lazy line like every container (markup-carve/carve#3885), so the column-zero line folds into the unreferenced note:

carve
:: t
: - para
    [^p]: n
x
html
<dl>
  <dt>t</dt>
  <dd>
    <ul>
      <li>para</li>
    </ul>
  </dd>
</dl>

A marker below every content column folds into the item (PART 9 §24 C3).

carve
:: t
: - para
 - li
html
<dl>
  <dt>t</dt>
  <dd>
    <ul>
      <li>para</li>
    </ul>
  </dd>
</dl>
<ul>
  <li>li</li>
</ul>

An opener past the note body and below the item opens in the note (CARVE-P0-024).

carve
[r][] [^p] [^c]
[^c]: - para
   # H
html
<p>[r][] [^p] <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <ul>
        <li>para</li>
      </ul>
      <h1 id="H">H</h1>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A marker below the description body column opens a sibling list when it reaches the item's content column (CARVE-P9-083).

carve
- :: t
  : para
   - li
html
<ul>
  <li>
    <dl>
      <dt>t</dt>
      <dd>para</dd>
    </dl>
    <ul>
      <li>li</li>
    </ul>
  </li>
</ul>

A lazy quoted continuation keeps its existing claim (CARVE-P0-005).

carve
- > a
  b
 [r]: /u
html
<ul>
  <li>
    <blockquote><p>a
b</p></blockquote>
  </li>
</ul>

An unmarked, unclosed fence line interrupts a quoted term: it ends the quote and opens at document level.

carve
> :: t
```
html
<blockquote>
  <dl>
    <dt>t</dt>
  </dl>
</blockquote>
<pre><code></code></pre>

A retained description reads the next unclosed fence as a code block (CARVE-P0-011).

carve
- :: t
  : para
 %% c
```
html
<ul>
  <li>
    <dl>
      <dt>t</dt>
      <dd>para</dd>
    </dl>
  </li>
</ul>
<pre><code></code></pre>

A lazy line keeps the quoted paragraph open for the next line (CARVE-P0-015).

carve
- > a
  > b
 [r]: /u
x
html
<ul>
  <li>
    <blockquote><p>a
b
x</p></blockquote>
  </li>
</ul>

A footnote body takes a lazy line like every container (markup-carve/carve#3885), so tail[^f] joins the note's paragraph. The note is then referenced only from inside itself and renders nothing.

carve
- > para
  > [^f]: n
  >   - sub
tail[^f]
html
<ul>
  <li>
    <blockquote><p>para</p></blockquote>
  </li>
</ul>

A retained code block leaves no paragraph, so the next column-0 line reaches the document (CARVE-P0-013).

carve
1. :: t
   : para
%% c
```
x
html
<ol>
  <li>
    <dl>
      <dt>t</dt>
      <dd>para</dd>
    </dl>
  </li>
</ol>
<pre><code>x
</code></pre>

An opener below a description body's column folds into a quote held there; only the body column opens (CARVE-P0-024).

carve
:: t
: > para
 # H
html
<dl>
  <dt>t</dt>
  <dd>
    <blockquote><p>para</p></blockquote>
  </dd>
</dl>
<section id="H">
  <h1>H</h1>
</section>

A heading below a description body's column folds into its paragraph, as under a list item (carve#3295).

carve
:: t
: para
 # H
html
<dl>
  <dt>t</dt>
  <dd>para</dd>
</dl>
<section id="H">
  <h1>H</h1>
</section>

A thematic break below a description body's column folds into its paragraph (carve#3295).

carve
:: t
: para
 ---
html
<dl>
  <dt>t</dt>
  <dd>para</dd>
</dl>
<hr>

A table row below a description body's column folds into its paragraph (carve#3295).

carve
:: t
: para
 | a |
html
<dl>
  <dt>t</dt>
  <dd>para</dd>
</dl>
<table>
  <tbody>
    <tr><td>a</td></tr>
  </tbody>
</table>

The + at the description marker column attaches the next paragraph to that description. The quote past the item column then opens in the item (CARVE-P0-024, markup-carve/carve#3421).

carve
- :: term
  : body
  +
  before
   > nested
html
<ul>
  <li>
    <dl>
      <dt>term</dt>
      <dd>
        <p>body</p>
        <p>before</p>
      </dd>
    </dl>
    <blockquote><p>nested</p></blockquote>
  </li>
</ul>

A caption line below a description body's column folds into its paragraph as text (PART 9 §10 I7).

carve
:: t
: para
^ cap
html
<dl>
  <dt>t</dt>
  <dd>para
^ cap</dd>
</dl>

A caption line below a description body's column folds into a quoted paragraph there as text, as under a list item (PART 9 §10 I7).

carve
:: t
: > para
^ cap
html
<dl>
  <dt>t</dt>
  <dd>
    <blockquote><p>para
^ cap</p></blockquote>
  </dd>
</dl>

A comment-retained list item reads an unclosed fence as a code block, and its unprefixed payload leaves the item (carve#3285).

carve
- para
%% c
```
x
html
<ul>
  <li>para</li>
</ul>
<pre><code>x
</code></pre>

A note in a comment-retained list item reads an unclosed fence as a code block too (carve#3285).

carve
- ::: note
  more
 %% c
```
html
<ul>
  <li>
    <aside class="admonition note" aria-label="Note">
      <p>more</p>
    </aside>
  </li>
</ul>
<pre><code></code></pre>

After a quoted paragraph, the retained code block still leaves no paragraph, so x reaches the document (carve#3285).

carve
- > para
  > more
%% c
```
x
html
<ul>
  <li>
    <blockquote><p>para
more</p></blockquote>
  </li>
</ul>
<pre><code>x
</code></pre>

A blank line inside a retained code block does not loosen the item (carve#3285).

carve
- para
%% c
```
  x

  y
html
<ul>
  <li>para</li>
</ul>
<pre><code>  x

  y
</code></pre>

After a marked quote line, a matched comment fence below the item column retains the item as a comment line does (CARVE-P0-005).

carve
- > para
  > more
 %%%
 %%%
```
html
<ul>
  <li>
    <blockquote><p>para
more</p></blockquote>
  </li>
</ul>
<pre><code></code></pre>

A quote in a note on a description marker line holds the deepest open paragraph, so a column-0 line folds into it (PART 0 S4, markup-carve/carve#3885).

carve
x[^c]

:: t
: [^c]: para
     > q
tail
html
<p>x<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<dl>
  <dt>t</dt>
  <dd></dd>
</dl>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>para</p>
      <blockquote><p>q
tail</p></blockquote>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

An item comment or attribute line closes the item's paragraph ​

7 conformance fixtures

An item line under an item's paragraph starts the next item and reads its content. A comment or block-attribute line there closes the paragraph, and an unclosed fence on the next line opens in the note, where it runs to the end, the note's own closer included. Bullet, ordered and nested items all read it:

carve
::: note
- para
- %% c
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li>para</li>
    <li></li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>
carve
::: note
- para
- {#x}
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li>para</li>
    <li></li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>
carve
::: note
1. para
2. %% c
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ol>
    <li>para</li>
    <li></li>
  </ol>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>
carve
::: note
- para
  - {#x}
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li>para
      <ul>
        <li></li>
      </ul>
    </li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

Item text keeps the paragraph open, and the fence line interrupts it all the same:

carve
::: note
- para
- text
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li>para</li>
    <li>text</li>
  </ul>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

Under a plain paragraph an item line is lazy text (PART 9 §10 I2) and reads no content, so a comment there keeps the paragraph open too, quoted or not. The fence interrupts that paragraph like any other:

carve
::: note
para
- %% c
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <p>para
-</p>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>
carve
::: note
> para
> - %% c
```
code
::::
:::
after *b*
html
<aside class="admonition note" aria-label="Note">
  <blockquote><p>para
-</p></blockquote>
  <pre><code>code
::::
:::
after *b*
</code></pre>
</aside>

Blockquote lazy continuation ​

6 conformance fixtures

A line that follows a > line, is not blank, and does not begin its own block continues the blockquote — the > may be omitted on continuation lines (CommonMark-style). A blank line ends the quote.

carve
> quoted
continued
html
<blockquote><p>quoted
continued</p></blockquote>

A block-opener is not a lazy continuation: it ends the quote and starts that block outside it. A list marker — bullet or ordered — folds in, though: a quoted line ends in an open paragraph, and a list marker folds into an open paragraph (§10), exactly as at the top level. So > quoted then - item is one quote whose paragraph is quoted + - item, not a quote plus a sibling list. (A heading, a bounded title, is still ended by a list marker; to put a real list in a quote, >-prefix it or use the + continuation marker.)

carve
> quoted
- item
html
<blockquote><p>quoted
- item</p></blockquote>

The fold needs an open paragraph to fold into. When the last quoted line is a heading (or any block that is not an open paragraph), there is nothing to fold into, so the list marker ends the quote and starts a top-level list — exactly as # h then - item does at the top level.

carve
> # h
- item
html
<blockquote>
  <h1 id="h">h</h1>
</blockquote>
<ul>
  <li>item</li>
</ul>

The open-paragraph condition is not about list markers. Plain lazy text needs one too, and the same closed blocks leave none - so the quote ends and the line becomes a top-level paragraph.

This is the case the list-marker example above does not reach, and every engine had a defect in it: carve-php kept the quote open after a heading, and carve-js and carve-php both kept it open after the two below.

carve
> # h
b
html
<blockquote>
  <h1 id="h">h</h1>
</blockquote>
<p>b</p>

A definition term is an ordinary line, so it leaves the quote open for lazy text and the next line folds into the term (CARVE-P0-024).

carve
> :: t
~
html
<blockquote>
  <dl>
    <dt>t</dt>
  </dl>
</blockquote>
<p>~</p>

An invisible definition leaves nothing on the page at all, which is the clearest case of the rule: there is no paragraph because there is no output.

carve
> [f]: ~
/
html
<blockquote>

</blockquote>
<p>/</p>

Lazy text stays in an unclosed quoted admonition ​

1 conformance fixture

The quote keeps an open paragraph across a flush-left lazy line.

carve
> ::: note
> a
b
html
<blockquote>
  <aside class="admonition note" aria-label="Note">
    <p>a
b</p>
  </aside>
</blockquote>

Fenced code language with punctuation ​

1 conformance fixture

A language tag may contain punctuation (c++, c#, f#, asp.net). The language is still a single token, so in a multiword info (e.g. js title="x") the rest is invalid metadata, which the opener drops.

carve
```c++
int main() {}
```
html
<pre><code class="language-c++">int main() {}
</code></pre>

Blockquote lazy continuation stops at a fenced block ​

3 conformance fixtures

Lazy continuation only extends an open paragraph. A non-> line that lands inside an open fenced code block ends the quote instead of being swallowed into the code. After the quote ends, b starts a paragraph and the trailing > c interrupts it into a fresh block quote (§10 — a > marker interrupts a paragraph). In the second example the mid-paragraph ``` has no closer, and it still interrupts (§10 I4): the unclosed fence opens an empty code block, and lazy, which misses the quote, ends it and the quote.

carve
> ```
> a
b
> c
html
<blockquote>
  <pre><code>a
</code></pre>
</blockquote>
<p>b</p>
<blockquote><p>c</p></blockquote>
carve
> text
> ```
lazy
html
<blockquote>
  <p>text</p>
  <pre><code></code></pre>
</blockquote>
<p>lazy</p>

When the fence opener is immediately followed by a non-> line — with no marked content line in between — the fence is never closed (an empty code block), and the non-> line ends the quote. The trailing > still then opens a fresh block quote.

carve
> ```
code no marker
> still
html
<blockquote>
  <pre><code></code></pre>
</blockquote>
<p>code no marker</p>
<blockquote><p>still</p></blockquote>

Nested comment fences ​

1 conformance fixture

A longer comment fence may contain a shorter one as content - the block ends only at a fence of the opener's length.

carve
before

%%%%
hidden %%% inner fence stays hidden
%%%%

after
html
<p>before</p>
<p>after</p>

Indented colon-fence blocks open ​

4 conformance fixtures

A ::: line indented by a space at top level opens its container (carve#3885). This holds for a bare div, a ::: | line block, and a named admonition alike.

An indented bare ::: opens a div.

carve
 :::
 A box.
 :::
html
<div>
  <p>A box.</p>
</div>

An indented ::: | opens a line block.

carve
 ::: |
 Roses,
 Violets.
 :::
html
<div class="line-block">
  <p>Roses,<br>
Violets.</p>
</div>

An indented ::: note opens an admonition.

carve
 ::: note
 Body.
 :::
html
<aside class="admonition note" aria-label="Note">
  <p>Body.</p>
</aside>

Control - flush left at column 0 the same ::: opens a div.

carve
:::
A box.
:::
html
<div>
  <p>A box.</p>
</div>

Below-content-column div body in a list item stays literal ​

1 conformance fixture

Inside a list item the block openers key on the item content column, not column 0. A ::: note on the item's marker line opens its container whatever the next line is (PART 2, "A MARKER-LINE OPENER OPENS TOO", ruled on markup-carve/carve#2978). Lines below the content column are not its body, and the empty container leaves no paragraph for them to fold into (CARVE-P0-024), so they are read at the document. The section keeps the title of the reading it used to pin.

carve
- ::: note
 - para text
 :::
html
<ul>
  <li>
    <aside class="admonition note" aria-label="Note">

    </aside>
  </li>
  <li>para text</li>
</ul>
<div>

</div>

Comment fence with trailing text ​

1 conformance fixture

A %%% fence line is a delimiter plus an insignificant tail: only the leading run of % is structural, so %%% html opens a comment and %%% end closes one. No separating space is required, and %%% has no info string - a raw passthrough block is a code fence with an =FORMAT info string - so the body stays hidden and the following block still renders.

carve
before

%%% html
secret
%%% end

after
html
<p>before</p>
<p>after</p>

Unterminated comment fence ​

1 conformance fixture

Since markup-carve/carve#4907 a %%% opener opens its span with no closer lookahead: without a closer it hides everything up to a line that misses its owner or the end of its container (PART 9 §28). The rows below follow that reading; where the prose describes a closerless opener as a %% line or a closer ahead as deciding the span, it records the reading the ruling replaced.

A %%% opener with no matching closer ahead does not open a block. The line degrades to a %% line comment, so every following block still renders. This is deliberately not the unclosed-::: rule (PART 9 §12), where the opener opens and the container closes at the end of the input: a comment block is invisible either way, so failing closed costs nothing here, whereas the same choice on a container turned one mistyped closer into a tail of literal text. A tail on the opener (%%% TODO) changes nothing.

carve
before

%%%
secret

after
html
<p>before</p>

Widened verbatim fences ​

1 conformance fixture

A verbatim run widens so its content can hold a shorter backtick run: the span ends at a run of EXACTLY the opening width, and any shorter run inside is content. That applies uniformly to the whole verbatim family - inline code, the inline literal, and both math forms - because each is the same backtick run with a different sigil in front.

Worth pinning because a highlighter or engine that only handles the one- and two-backtick widths closes at the first shorter run inside a wider fence and leaks the rest of the span as prose, which is exactly what happened in the highlight.js grammar (markup-carve/carve-grammars#52). No other corpus case uses a fence wider than two backticks for these constructs.

carve
A ```span with `` inside``` stays one code span.

A !```literal with `` inside``` stays prose.

Then $```a `` b``` ends the run.

$$```x `` y```
html
<p>A <code>span with `` inside</code> stays one code span.</p>
<p>A literal with `` inside stays prose.</p>
<p>Then <span class="math inline" role="math">\(a `` b\)</span> ends the run.</p>
<p><span class="math display" role="math">\[x `` y\]</span></p>

A comment is recognized at any column ​

1 conformance fixture

Every other construct below an item's content column folds as text (§24 C3), but a comment is invisible by nature and authors indent one freely, so it is found wherever it sits. Folding it would make %% c visible, which is the one outcome a comment may never have. The item stays open, so a following line still belongs to it.

carve
- a
 %% c
b
html
<ul>
  <li>a
b</li>
</ul>

A comment fence is a comment at any column too ​

1 conformance fixture

§24 C3 recognizes a comment at any column, and that covers the fence form as well as the %% line: an indented %%% opener below an item's content column stays invisible, along with the body it encloses. Rendering the opener as text would put the comment on the page, which is what the rule exists to prevent.

carve
- a
 %%% n
 x
 %%%
 tail
html
<ul>
  <li>a</li>
</ul>
<p>tail</p>

A comment under a nested item does not close it ​

1 conformance fixture

A comment renders nothing, so it cannot decide which item the line after it belongs to. Remove the comment and b folds into the inner item; with it there, b must still fold into the inner item. An invisible construct has no structural effect - §28's comment_line makes the indentation part of the construct rather than a column measurement.

carve
- - a
 %% c
 b
html
<ul>
  <li>
    <ul>
      <li>a
b</li>
    </ul>
  </li>
</ul>

A definition inside a comment registers nothing ​

1 conformance fixture

A comment's body is opaque, and that covers the lines that render nothing of their own. A link reference or footnote definition written inside %%% registers no label, so a reference to it elsewhere stays literal. A definition that registered from inside a comment would be invisible in the output and active in the link table at once - a reference resolving against text the author commented out.

carve
%%%
[r]: /u
%%%
[r][]
html
<p>[r][]</p>

A comment fence at an item's content column registers nothing either ​

1 conformance fixture

%%% at a list item's content column is the same construct as %%% at column 0. PART 9 §24 S1 places a line by the column it REACHES and never by its first character, S2 makes a line verbatim as soon as the innermost matched container is a fenced body, and §28 makes a comment fence's body verbatim and invisible. Not one of the three is scoped to column 0, so what "A definition inside a comment registers nothing" states above holds wherever the fence sits: the label is not registered, and the reference to it stays literal.

carve
- item
  %%%
  [r]: /url
  %%%

[r][]
html
<ul>
  <li>item</li>
</ul>
<p>[r][]</p>

The corpus stated the rule and pinned only the column-0 spelling, which is the gap two engines drifted through while staying green: carve-rs and carve-php both collected the label here and resolved the reference, where carve-js and the executable spec leave it literal (carve#1309, markup-carve/carve-rs#1047, markup-carve/carve-php#1349). carve-rs has since been fixed and reproduces this document (markup-carve/carve-rs#1052); carve-php still collects the label. Nothing about the item's own rendering was ever in question - all three render the comment as nothing and the item as item. The disagreement is entirely in the link table, which is why the document has to be read past the list to see it at all.

A footnote definition inside an item's comment registers nothing ​

1 conformance fixture

The footnote collector is a separate pass from the link-reference one in every implementation, so it is a separate place to drift and needs its own document. The rule is the same rule, and the symptom is worse: a collected footnote definition does not merely resolve a reference, it emits an endnotes section the author commented out.

carve
- item
  %%%
  [^f]: note body
  %%%

text[^f]
html
<ul>
  <li>item</li>
</ul>
<p>text[^f]</p>

A comment fence opened on an item's marker line hides its body too ​

1 conformance fixture

The fence may open on the marker line itself. - %%% is a bullet whose content begins with a comment fence, the closer sits at the content column, and the item is empty of everything between them. This is the spelling a container-aware reader is most likely to miss, because the fence's own line carries the marker rather than the indentation.

carve
- %%%
  [r]: /url
  %%%

[r][]
html
<ul>
  <li></li>
</ul>
<p>[r][]</p>

A comment fence one item deeper registers nothing either ​

1 conformance fixture

Nothing in §24 S2 counts containers, so a second level of nesting is not a second rule. The fence sits at the inner item's content column and hides its body exactly as it does at the outer one.

carve
- a
  - b
    %%%
    [r]: /url
    %%%

[r][]
html
<ul>
  <li>a
    <ul>
      <li>b</li>
    </ul>
  </li>
</ul>
<p>[r][]</p>

A wider comment fence inside an item hides its body the same way ​

1 conformance fixture

Fence WIDTH decides which line closes the fence (§28's exact-length closer), not whether the body is opaque. A four-percent fence at an item's content column is as invisible to the definition collector as a three-percent one, so the two axes stay independent.

carve
- item
  %%%%
  [r]: /url
  %%%%

[r][]
html
<ul>
  <li>item</li>
</ul>
<p>[r][]</p>

An abbreviation inside a comment defines nothing ​

1 conformance fixture

The abbreviation collector is a third pass again, and this is the one document in the group that has to sit at column 0: PART 12 §7 recognizes an abbreviation definition only as a direct child of the DOCUMENT, so an abbreviation written inside an item's comment is already not a definition for a reason that has nothing to do with the comment, and a document written that way could not tell the two reasons apart. At column 0 both reasons are live and only the comment is doing the work.

carve
%%%
*[HTML]: HyperText Markup Language
%%%

HTML here
html
<p>HTML here</p>

Its position makes it look like the link-reference case above, and the collector it exercises makes it a different document: carve-php reads the link-reference form of this shape correctly and defines the abbreviation anyway (markup-carve/carve-php#1349). An abbreviation is the worst of the three to leak, because the use site carries no bracket to give it away - the term is rewritten in running prose that never asked for it.

A comment fence inside a colon container registers nothing ​

1 conformance fixture

A colon container's body is parsed as blocks, so a comment fence inside one is a comment fence and its body is opaque for the same reason it is anywhere else.

carve
::: note
Body.

%%%
[r]: /url
%%%
:::

[r][]
html
<aside class="admonition note" aria-label="Note">
  <p>Body.</p>
</aside>
<p>[r][]</p>

The quoted spelling is pinned too, under A comment fence reached through a quote registers nothing either at the end of this file. It sits there rather than here only so that adding it renumbers no existing section.

A comment fence reached through a quote registers nothing either ​

3 conformance fixtures

The last of the three columns a comment fence can sit at. markup-carve/carve#1309 ruled that a definition inside a comment fence is not registered wherever the fence sits, and the corpus pinned the column-0 spelling and the indented one inside a list item. The quoted spelling was left out on the grounds that all three engines registered there, which made it a disagreement rather than a coverage gap - a carve-out that expired once the three engine tickets existed (markup-carve/carve#1341, markup-carve/carve-js#1177, markup-carve/carve-php#1402, markup-carve/carve-rs#1078).

Nothing scopes the fence by container. comment_block gives its body as {character | newline}, verbatim, and §28 and §24 C3 name no container anywhere; a rule that distinguished a fence reached through a > prefix from one reached through indentation would make the same four lines register or not by their prefix. The quote is empty in all four implementations, so the fence IS consumed as a comment - and the definition inside it is then read by a later pass that was looking at lines the block parser had already swallowed.

A link reference definition:

carve
> %%%
> [r]: /url
> %%%

See [r][].
html
<blockquote>

</blockquote>
<p>See [r][].</p>

The same fence over a footnote definition. Both kinds are here because the leak sorts definitions BY KIND, which is the evidence that no rule is being followed: carve-js registers the reference above and leaves this note literal, while carve-php and carve-rs register both. A single-kind document would let carve-js pass on the half it happens to get right.

carve
> %%%
> [^f]: note
> %%%

See [^f].
html
<blockquote>

</blockquote>
<p>See [^f].</p>

The control is the same two definitions with the fence taken away. They register document-wide from inside a quote in all four implementations, so what the documents above pin is the comment, not the quote:

carve
> [r]: /url
> [^f]: note

See [r][] [^f].
html
<blockquote>

</blockquote>
<p>See <a href="/url">r</a> <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a>.</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>note<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

The abbreviation kind is deliberately absent, for the reason An abbreviation inside a comment defines nothing gives above: PART 12 §7 recognizes an abbreviation definition only as a direct child of the DOCUMENT, so > *[ab]: abbrev defines nothing whether a comment fence wraps it or not - all four implementations leave the use literal either way. A document written that way could not tell the two reasons apart, and it is pinned at column 0 instead, where only the comment is doing the work.

A blank after a comment still ends the item ​

1 conformance fixture

A comment renders nothing, so it neither closes the item nor holds it open across a blank line. The blank does what a blank always does: it ends the item, and the indented line after it is a document-level paragraph rather than item content.

carve
- - a
 %% c

 b
html
<ul>
  <li>
    <ul>
      <li>a</li>
    </ul>
  </li>
</ul>
<p>b</p>

A comment fence under a nested item does not close it either ​

1 conformance fixture

The fence form behaves as the %% line does: it is invisible, it leaves the item open, and the line after it folds into the inner item exactly as it would with no comment between.

carve
- - a
 %%% c
 x
 %%%
 b
html
<ul>
  <li>
    <ul>
      <li>a</li>
    </ul>
  </li>
</ul>
<p>b</p>

A comment ends the paragraph it sits under ​

1 conformance fixture

A comment at the item's content column closes its paragraph and retains nothing (CARVE-P0-024, CARVE-P0-005). The following below-column line opens a document paragraph, and the next list starts after it.

carve
- a
  %% x
 b

- c
html
<ul>
  <li><p>a
b</p></li>
  <li><p>c</p></li>
</ul>

A quote marker is > plus a space, and a lazy line keeps its own text ​

1 conformance fixture

>text with no space is prose, not a quote marker (§10 I1). Inside an open quoted paragraph such a line folds in as lazy continuation and keeps its >, rather than being read as a marker and stripped.

carve
> ok
>bad
html
<blockquote><p>ok
&gt;bad</p></blockquote>

A block-attribute line inside a quote ends the paragraph above it ​

1 conformance fixture

§10 I5 lists the block-attribute line among the invisible constructs that interrupt an open paragraph, and that holds inside a container as much as at the top level: the paragraph ends, and the attributes attach to the block that follows.

carve
> a
> {.c}
> text
html
<blockquote>
  <p>a</p>
  <p class="c">text</p>
</blockquote>

A floating attribute is scoped to the container that holds it ​

10 conformance fixtures

PART 9 §15 A2 says a pending {...} applies to the next block. That answers which BLOCK, not which container, and containment already bounds everything else in the language — so an attribute written inside a quote, an item or a dd does not survive that container's end (markup-carve/carve#1281).

A4 already dropped an attribute with no block left to attach to; a container's end is the second way to run out of blocks, and it drops the same way. Neither is silent: both are reported as unattached-block-attribute.

A wrapped brace run must first satisfy CARVE-P2-035. A continuation at or below its opening column makes the whole run text, so it has no attribute to drop.

The attribute does not escape over a blank line onto a document-level paragraph — tail here is unclassed:

carve
> q
> {.k}

tail
html
<blockquote><p>q</p></blockquote>
<p>tail</p>

Without the blank line the answer is the same, and it composes with §S4: the attribute leaves no open paragraph, so the flush-left line ends the quote rather than joining it, and A4 then has nothing left to attach to.

carve
> q
> {.k}
tail
html
<blockquote><p>q</p></blockquote>
<p>tail</p>

A list item is the same container question:

carve
- a
  {.k}

tail
html
<ul>
  <li>a</li>
</ul>
<p>tail</p>

And the attribute does not reach FORWARD out of the item to pull a block in either. The heading stays outside and stays unclassed:

carve
- a
  {.k}
# H
html
<ul>
  <li>a</li>
</ul>
<section id="H">
  <h1>H</h1>
</section>

A definition body ends the same way:

carve
:: t
:  d
   {.k}
tail
html
<dl>
  <dt>t</dt>
  <dd>d</dd>
</dl>
<p>tail</p>

An attribute block may wrap across lines (§15 A5), but the second line must pass the opening column (CARVE-P2-035). Here the body ending {.k / #x} is literal paragraph text, so it still does not reach tail:

carve
:: t
:  d
   {.k
   #x}
tail
html
<dl>
  <dt>t</dt>
  <dd>d
{.k
<span class="tag"><strong>#x</strong></span>}
tail</dd>
</dl>

Scoped, not disabled ​

The controls are what keep "scoped" from reading as "dropped". Inside its own container the attribute attaches exactly as it always has — in a quote:

carve
> {.k}
>
> tail
html
<blockquote><p class="k">tail</p></blockquote>

in a list item:

carve
- a
  {.k}
  # H
html
<ul>
  <li>a
    <h1 class="k" id="H">H</h1>
  </li>
</ul>

in a definition body:

carve
:: t
:  d
   {.k}
   # H
html
<dl>
  <dt>t</dt>
  <dd>
    <p>d</p>
    <h1 class="k" id="H">H</h1>
  </dd>
</dl>

and at the top level, where the document is the container and a blank line ends nothing:

carve
{.k}

tail
html
<p class="k">tail</p>

A floating attribute under a definition attaches at column zero ​

4 conformance fixtures

Column 0 is not below a column - it is the surrounding document's own opener column, which is where a definition is collected and where a floating attribute block lives (§10 I5). So the description ends and the attribute floats forward at document level onto the next visible block, exactly as it does under a list item or a block quote.

carve
:: t
:  d
{.k}
tail
html
<dl>
  <dt>t</dt>
  <dd>d</dd>
</dl>
<p class="k">tail</p>

A blank line above the attribute is not what makes pending metadata exist (§15 A2 FLOAT FORWARD says pending SURVIVES a blank line). The two spellings agree.

carve
:: t
:  d

{.k}
tail
html
<dl>
  <dt>t</dt>
  <dd>d</dd>
</dl>
<p class="k">tail</p>

The list-item host is the control, and it answers the same. Both rows are here because it was their disagreement that was the defect, and one row cannot record a disagreement.

carve
- d
{.k}
tail
html
<ul>
  <li>d</li>
</ul>
<p class="k">tail</p>

A definition at the same column is the other half of the same band: it ends the description too, and being at the document's opener column it REGISTERS, so the reference below it resolves.

carve
:: t
:  d
[r]: /u

See [text][r].
html
<dl>
  <dt>t</dt>
  <dd>d</dd>
</dl>
<p>See <a href="/u">text</a>.</p>

A comment fence at column 0 ends the item; a %% line does not ​

2 conformance fixtures

Both spellings stay invisible wherever they sit (§24 C3). They differ in what they do to the item above them: a flush-left %%% fence ends it, so the next line belongs to the document, while a flush-left %% line leaves the item open and that line folds in. An INDENTED fence stays with the item either way.

carve
- a
%%%
c
%%%
b
html
<ul>
  <li>a</li>
</ul>
<p>b</p>

The line form, same columns, different answer:

carve
- a
%% c
b
html
<ul>
  <li>a
b</li>
</ul>

Two backticks are not a code fence, opening or closing ​

2 conformance fixtures

A fence opens on three or more. Two backticks are an inline code span, so the lines between them become its content instead of a code block.

carve
``
code
``
html
<p><code>
code
</code></p>

The closer is the same length rule seen from the other side: a two-backtick line inside an open fence is CONTENT, not the end of the block.

carve
```
code
``
still code
```
html
<pre><code>code
``
still code
</code></pre>

A single percent is not a comment ​

1 conformance fixture

A comment line opens on %%. One percent is ordinary text, which matters because the character is common in prose.

carve
% not a comment
html
<p>% not a comment</p>

A multi-line raw block is placed at its opening and verbatim after it ​

2 conformance fixtures

A raw block's content reaches the target unchanged, so a renderer that indents its output indents the block's OPENING position - the way it would any other block - and leaves every line after the first on the columns the author gave it. The corpus pinned only a single-line raw block, which is the one shape where "indent the block" and "indent every line" agree, so three engines could pass it while giving three different answers here.

carve
[^a]: note

  ```=html
  <b>x</b>
  <i>y</i>

see[^a]


```html
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>note</p>
      <b>x</b>
<i>y</i>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

Inside a <pre> the difference is CONTENT rather than layout: two columns added to each line change what the rendered code block says.

carve
> ```=html
> <pre>
> a
>   b
> </pre>
> ```
html
<blockquote>
  <pre>
a
  b
</pre>
</blockquote>

An all-blank raw payload still emits its line ​

1 conformance fixture

The payload is every line between the delimiters, so a sole blank line is not an absent block. For a matching raw format it contributes its newline exactly as a trailing blank does beside other content, which leaves a blank line above the paragraph that follows. A harness that trims before comparing cannot see that newline here, because it stands first in the output; the pairs that put a paragraph above the block are where it is visible.

carve
```=html

```

after
html


<p>after</p>

A zero-line and a one-blank raw payload are not the same block ​

9 conformance fixtures

PART 2 raw_block separates the two shapes by hand: zero payload lines contribute nothing, one blank payload line contributes one newline, and an implementation must not encode them identically. Joining n payload lines with a newline gives n-1 newlines, which is the collapse the clause names, so each pair below stands a zero-line payload beside a one-blank-line payload in one host and changes nothing else between them.

A list item, a quote and an admonition come first. The fourth pair leaves the fence unterminated, the second place the payload is built and the second place it collapsed. The last document has no zero-line partner: at the top level the blank payload line reads as a blank line between two paragraphs, and the zero-line half there is carve-js#2326 rather than a question about the clause (carve#2557).

carve
- a

  ```=html
  ```

- s
html
<ul>
  <li><p>a</p>
    
  </li>
  <li><p>s</p></li>
</ul>
carve
- a

  ```=html

  ```

- s
html
<ul>
  <li><p>a</p>
    

  </li>
  <li><p>s</p></li>
</ul>
carve
> a
>
> ```=html
> ```

b
html
<blockquote>
  <p>a</p>
  
</blockquote>
<p>b</p>
carve
> a
>
> ```=html
>
> ```

b
html
<blockquote>
  <p>a</p>
  

</blockquote>
<p>b</p>
carve
::: note
a

```=html
```
:::
html
<aside class="admonition note" aria-label="Note">
  <p>a</p>
  
</aside>
carve
::: note
a

```=html

```
:::
html
<aside class="admonition note" aria-label="Note">
  <p>a</p>
  

</aside>
carve
> a
>
> ```=html

b
html
<blockquote>
  <p>a</p>
  
</blockquote>
<p>b</p>
carve
> a
>
> ```=html
>

b
html
<blockquote>
  <p>a</p>
  

</blockquote>
<p>b</p>
carve
a

```=html

```

b
html
<p>a</p>


<p>b</p>

An unterminated raw fence keeps literal payload termination ​

3 conformance fixtures

An unclosed raw fence retains its payload through EOF. The matching HTML adapter preserves ordinary output; other raw formats emit no HTML.

carve
```=html
<b>raw</b>
html
<b>raw</b>
carve
before

```=latex
x
html
<p>before</p>
carve
before

```=markdown
x
html
<p>before</p>

An empty code payload renders no characters ​

2 conformance fixtures

PART 2 code_content is "any text until matching fence, preserved literally", and zero lines preserved literally is zero characters. A newline is content, so a fence with no payload lines that emits one publishes a character the author did not write - and it makes the two documents below indistinguishable, which is the same collapse raw_block states for itself in the category above.

The one-blank payload keeps its newline. That half is not in question and sits here as the partner the zero-line shape is told apart from (carve#2560).

carve
```
```
html
<pre><code></code></pre>
carve
```

```
html
<pre><code>
</code></pre>

A raw block passes its attributes through untouched ​

1 conformance fixture

A raw block is verbatim, and that includes attributes the renderer would never write itself. Nothing inspects the payload, so an event handler survives exactly as written - which is the property docs/html-import.md relies on when it calls this shape unsafe for untrusted input.

It is also the shape that separates the two readings of a refused attribute on the way back IN. Importing this HTML in safe mode rewrites the element and drops the handler, while roundtrip keeps the element whole and preserves the handler with it, so the same attribute is reported as dropped in one mode and preserved in the other.

carve
```=html
<custom onclick="reveal()">t</custom>
```
html
<custom onclick="reveal()">t</custom>

An absorbed colon fence leaves a block quote's paragraph open ​

4 conformance fixtures

:::note has no space between the fence and the type word, so §12's opener test rejects it: it opens no block, is ordinary paragraph text and leaves no state. The bare run below it is read on its own (carve#4863). It interrupts the quote's paragraph and opens an empty div, so nothing is open when tail arrives at column 0, and the line leaves the quote:

carve
> quote
> :::note
> body
> :::
tail
html
<blockquote>
  <p>quote
:::note
body</p>
  <div>

  </div>
</blockquote>
<p>tail</p>

A run of another width reads the same way:

carve
> quote
> :::note
> body
> ::::
tail
html
<blockquote>
  <p>quote
:::note
body</p>
  <div>

  </div>
</blockquote>
<p>tail</p>

The malformed fence may be the quote's first line:

carve
> :::note
> :::
tail
html
<blockquote>
  <p>:::note</p>
  <div>

  </div>
</blockquote>
<p>tail</p>

It holds at depth two:

carve
> > quote
> > :::note
> > body
> > :::
tail
html
<blockquote>
  <blockquote>
    <p>quote
:::note
body</p>
    <div>

    </div>
  </blockquote>
</blockquote>
<p>tail</p>

Give the same fence its space and the two lines between become its body: written ::: note it is a valid opener and the run is its closer. tail leaves the quote in both spellings.

A real div in a container and the flush-left line after it ​

3 conformance fixtures

PART 1 S4 folds a flush-left line into the innermost open paragraph, and folds nothing when there is none. A REAL ::: div - one whose opener passes PART 7's separator test, so it is a block and not absorbed paragraph text - makes that clause decide two ways depending on what the div holds when the line arrives.

An UNTERMINATED div holding a paragraph has an open paragraph in the stack, so the flush-left line folds into it. An unterminated div holding NOTHING has none, so the line ends the container instead. The two documents differ by one line of body, and that line is the whole rule (carve#909).

carve
- item
  ::: note
  body
tail
html
<ul>
  <li>item
    <aside class="admonition note" aria-label="Note">
      <p>body
tail</p>
    </aside>
  </li>
</ul>

The same shape with an empty div. Nothing in the stack holds an open paragraph when tail arrives - the item's own paragraph was closed by the div that followed it, and the div itself is empty - so S4 folds nothing and the line is a top-level paragraph.

carve
- item
  ::: note
tail
html
<ul>
  <li>item
    <aside class="admonition note" aria-label="Note">

    </aside>
  </li>
</ul>
<p>tail</p>

CONTROL, and the reason the rule is about an UNTERMINATED div. Close the div and the paragraph inside it closes with it, so the first document's answer inverts on the strength of one ::: line. This pins behavior that does not change.

carve
- item
  ::: note
  body

tail


```html
<ul>
  <li>item
    <aside class="admonition note" aria-label="Note">
      <p>body</p>
    </aside>
  </li>
</ul>
<p>tail</p>

:::

A note on the spelling, because it is what made this look like a four-way split when carve#909 was written. The shapes there are spelled :::note, with no separator. PART 7 has since narrowed the colon fence's separator to a space (carve#900, carve#905), so :::note no longer passes the opener test at all: it is ABSORBED as paragraph text, and the answer for it comes from §12's absorption rule and carve#902 rather than from S4. That row is already pinned by 86-list-lazy-continuation-9 and already declared in resources/engine-pin-drift.txt. The documents above use ::: note, which is a div.

The flush-left line after a container a quoted line opened ​

4 conformance fixtures

The item form of PART 1 S4's NO OPEN PARAGRAPH, NO LAZY LINE is pinned above, under A real div in a container. The BLOCK QUOTE form was not pinned anywhere (markup-carve/carve#920), and the two containers were answering the same question differently: a list item closed and put the flush-left line at top level, while a block quote kept it.

The stack after > ::: note holds a quote and an EMPTY div. S4 asks whether ANY container in it holds an OPEN paragraph, and none does - the quote's own paragraph was closed by the div opener, and the div has no content yet. So tail supplies no prefix, nothing is open for it to fold into, both containers close, and it is a top-level paragraph:

carve
> quote
> ::: note
tail
html
<blockquote>
  <p>quote</p>
  <aside class="admonition note" aria-label="Note">

  </aside>
</blockquote>
<p>tail</p>

Closing the div does not change the answer, because a CLOSED container holds no open paragraph either. Both the empty form and the form with a body land the same way, and they are the block-quote twins of the list-item documents above:

carve
> quote
> ::: note
>
> :::
tail
html
<blockquote>
  <p>quote</p>
  <aside class="admonition note" aria-label="Note">

  </aside>
</blockquote>
<p>tail</p>
carve
> quote
> ::: note
> body
> :::
tail
html
<blockquote>
  <p>quote</p>
  <aside class="admonition note" aria-label="Note">
    <p>body</p>
  </aside>
</blockquote>
<p>tail</p>

The last document is the one place §12's absorption and S4 meet, and they are decided by WHOSE line it is. :::note has no separator, so it opens nothing and is absorbed as paragraph text - and the quoted > ::: under it is absorbed on the same terms, which is what An absorbed colon fence leaves a block quote's paragraph open pins. A FLUSH-LEFT ::: is not one of the quote's lines: it supplies no > prefix and would reach that paragraph only by S4's lazy fold. The strict column-0 rule decides it instead. The quote closes and the line is re-classified at top level, where it opens a div of its own:

carve
> quote
> :::note
> body
:::
html
<blockquote><p>quote
:::note
body</p></blockquote>
<div>

</div>

A column-0 line after a container's last block, when that block left no paragraph open ​

29 conformance fixtures

Since markup-carve/carve#4907 a %%% opener opens its span with no closer lookahead: without a closer it hides everything up to a line that misses its owner or the end of its container (PART 9 §28). The rows below follow that reading; where the prose describes a closerless opener as a %% line or a closer ahead as deciding the span, it records the reading the ruling replaced.

PART 1 S4's NO OPEN PARAGRAPH, NO LAZY LINE is pinned above for an empty quote, which reads as though EMPTINESS were the property doing the work. It is not. The parameter S4 names is whether any container in the open stack holds an open paragraph, and a block that leaves none leaves none wherever it was written: - # H puts a heading in the item exactly as an indented # H would.

So a flush-left line after a heading, a table, a break, a comment, a definition or an attribute block ends the item, and each of these is the same derivation a block quote already got in every engine (markup-carve/carve#1280).

A heading is a bounded title. Nothing is open after it:

carve
- # H
tail
html
<ul>
  <li>
    <h1 id="H">H</h1>
  </li>
</ul>
<p>tail</p>

The block quote spelling of the same document, which every engine already read this way. The two containers are one rule, and this is the pair that says so:

carve
> # H
tail
html
<blockquote>
  <h1 id="H">H</h1>
</blockquote>
<p>tail</p>

A table ends at its last row:

carve
- | a | b |
tail
html
<ul>
  <li>
    <table>
      <tbody>
        <tr><td>a</td><td>b</td></tr>
      </tbody>
    </table>
  </li>
</ul>
<p>tail</p>

A thematic break holds nothing at all:

carve
- ---
tail
html
<ul>
  <li>
    <hr>
  </li>
</ul>
<p>tail</p>

A comment is invisible, and invisible is not open. The item renders empty rather than absorbing the line below it:

carve
- %% c
tail
html
<ul>
  <li></li>
</ul>
<p>tail</p>

The fence spelling of a comment answers the same way. Its closer travels with its opener, and what follows the closer is outside the item:

carve
- %%%
c
%%%
tail
html
<ul>
  <li></li>
</ul>
<p>c</p>

A link reference definition is metadata. Ending the item disposes of the line BELOW it, never of the definition itself - PART 9R collects that from wherever it was written, and the use below still resolves:

carve
- [r]: /u
tail

[r][]
html
<ul>
  <li></li>
</ul>
<p>tail</p>
<p><a href="/u">r</a></p>

A footnote definition, the same both ways:

A footnote body takes a lazy line like every container (markup-carve/carve#3885), so the unmarked line below folds into the note:

carve
- [^f]: t
tail

see[^f]
html
<ul>
  <li></li>
</ul>
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>t
tail<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

An attribute block opens no paragraph either, so it never reaches the line below

  • the item ends first, and the attribute is left unconsumed:
carve
- {.k}
tail
html
<ul>
  <li></li>
</ul>
<p>tail</p>

A sibling marker after the same shape still opens a sibling, which is the control for "the item ended" rather than "the item swallowed something":

carve
- # H
- next
html
<ul>
  <li>
    <h1 id="H">H</h1>
  </li>
  <li>next</li>
</ul>

The question is asked of a quote RECURSIVELY, so a quote is not automatically an open paragraph either - what decides is the block the quote itself ends on:

carve
- > # H
tail
html
<ul>
  <li>
    <blockquote>
      <h1 id="H">H</h1>
    </blockquote>
  </li>
</ul>
<p>tail</p>

The two that still fold, because a paragraph IS open ​

The rule has one parameter, so the controls are the documents where that parameter has the other value. A nested quote's trailing paragraph is open, and the line folds into it:

carve
- > q
tail
html
<ul>
  <li>
    <blockquote><p>q
tail</p></blockquote>
  </li>
</ul>

And plain lead text is the ordinary lazy continuation, untouched by any of this:

carve
- a
tail
html
<ul>
  <li>a
tail</li>
</ul>

The unmatched item's last block may itself be a list ​

The clause binds "even where the unmatched container is a LIST ITEM whose last block is a container", and a nested list is that container. So the question is asked of the nested item's own last block, recursively, exactly as it is asked of a quote's - and it is asked however deep the nesting runs.

Read as prose instead, the marker line answers "paragraph" every time, and the tell is that depth 1 comes out right while depth 2 does not (markup-carve/carve#1342). The outer item's last block here is a list whose item ends on a heading, so nothing is open and tail is a document paragraph:

carve
- - # H
tail
html
<ul>
  <li>
    <ul>
      <li>
        <h1 id="H">H</h1>
      </li>
    </ul>
  </li>
</ul>
<p>tail</p>

A comment as the nested item's only block reaches the same answer by the same route, which is how one knows the depth and not the construct is what was missing:

carve
- - %% c
tail
html
<ul>
  <li>
    <ul>
      <li></li>
    </ul>
  </li>
</ul>
<p>tail</p>

Depth 3 is the document that locates it. An implementation that unwraps one level and then stops folds tail into the MIDDLE item rather than closing all three, so this pair distinguishes "the rule recurses" from "the rule was applied once":

carve
- - - # H
tail
html
<ul>
  <li>
    <ul>
      <li>
        <ul>
          <li>
            <h1 id="H">H</h1>
          </li>
        </ul>
      </li>
    </ul>
  </li>
</ul>
<p>tail</p>

The nested list need not be written on the marker line. A sub-list opened at the item's content column is the same last block, and leaves the same nothing open:

carve
- a
  - # H
tail
html
<ul>
  <li>a
    <ul>
      <li>
        <h1 id="H">H</h1>
      </li>
    </ul>
  </li>
</ul>
<p>tail</p>

The controls are the same three documents with a paragraph restored at the bottom of the stack. A nested item holding plain text folds, at any depth:

carve
- - a
tail
html
<ul>
  <li>
    <ul>
      <li>a
tail</li>
    </ul>
  </li>
</ul>

So does a nested item ending on a quote that CARRIES a paragraph - the recursion has to pass through both containers to reach it:

carve
- - > q
tail
html
<ul>
  <li>
    <ul>
      <li>
        <blockquote><p>q
tail</p></blockquote>
      </li>
    </ul>
  </li>
</ul>

And the content-column spelling folds too when its sub-item is prose:

carve
- a
  - b
tail
html
<ul>
  <li>a
    <ul>
      <li>b
tail</li>
    </ul>
  </li>
</ul>

An attribute line at the item's content column closes the paragraph too ​

§10 I5 makes a block-attribute line an interrupter, so an item whose last content line is one holds no open paragraph and the same clause ends it. The attribute was written against a container that ends before the flush-left line arrives, so it reaches nothing and is dropped - it does not travel down to the line below (markup-carve/carve#1342):

carve
- a
  {.x}
tail
html
<ul>
  <li>a</li>
</ul>
<p>tail</p>

Separating the attribute line with a blank changes nothing. The blank does not loosen the item either, because an attribute block renders nothing and §17 L1 asks for a second PARAGRAPH:

carve
- a

  {.x}
tail
html
<ul>
  <li>a</li>
</ul>
<p>tail</p>

The control is what the attribute does reach: a line at the content column is inside the item, the container has not ended, and the attribute attaches to the paragraph it introduces:

carve
- a
  {.x}
  more
html
<ul>
  <li>a
    <p class="x">more</p>
  </li>
</ul>

The quote spelling of the same shape is pinned under A floating attribute is scoped to the container that holds it below, and every engine already read it that way. That the two containers disagreed is what makes the item spelling a defect rather than a second reading.

A continuation-row SHAPE is prose until a table is above it ​

Every construct above answers S4 by its shape, and one construct cannot. §5 T6 says a table "cannot BEGIN with a continuation row", so a + ...| line reached where no table is open is not a row at all - it is ordinary paragraph text. A continuation row needs a body row pins that already at the document level, where the row that cannot attach renders as a paragraph.

A marker line is its container's FIRST block, so nothing is ever above it, and the line is prose there by construction. The item below publishes it as prose - and then, read by shape alone, told S4 it was a table row, so the item held no open paragraph and tail left it. Prose where it renders, a row where it is asked about (markup-carve/carve#1345):

carve
- + a |
tail
html
<ul>
  <li>+ a |
tail</li>
</ul>

The nested spelling reaches the same first block by the same peel the heading above uses, and answers the same way:

carve
- - + a |
tail
html
<ul>
  <li>
    <ul>
      <li>+ a |
tail</li>
    </ul>
  </li>
</ul>

At the item's CONTENT COLUMN there is a line above, so the question is real rather than settled by position - and a paragraph is not a table. The line joins that paragraph, and tail joins it too:

carve
- a
  + b |
tail
html
<ul>
  <li>a
+ b |
tail</li>
</ul>

A definition body is the third container that asks, and it asks about its last line. As that body's only line, the shape is prose for the marker line's reason:

carve
:: t
:  + a |
tail
html
<dl>
  <dt>t</dt>
  <dd>+ a |
tail</dd>
</dl>

And a line above it is not enough - what the rule wants above it is a TABLE:

carve
:: t
:  a
   + b |
tail
html
<dl>
  <dt>t</dt>
  <dd>a
+ b |
tail</dd>
</dl>

Through a QUOTE the body's last line is asked the same question one container in, and the quote holds a paragraph rather than a table - so the shape is prose there too, and the lazy line reaches all the way down:

carve
:: t
:  > a
   > + b |
tail
html
<dl>
  <dt>t</dt>
  <dd>
    <blockquote><p>a
+ b |
tail</p></blockquote>
  </dd>
</dl>

A list marker at the content column inside an open fence ​

2 conformance fixtures

A line that LOOKS like a list marker, sitting AT the item's content column inside an open code fence, is CODE TEXT. PART 9 §24's STEP walk decides it with no new rule, and neither of the two steps involved ever reads the line's first character.

Take - x with the stack document > list > item(content_column 2) > code fence body:

  • S1 MATCH PREFIXES consumes each container's prefix in turn. The line supplies the item's two columns, so the walk reaches the item; a fenced body demands no per-line prefix, so the walk reaches that too and stops there.
  • S2 FENCED BODY therefore fires - the innermost MATCHED container IS the fenced body - and the line is verbatim content unless it matches that fence's where-guarded closer. "No other rule applies to L." A marker is never asked about.

The plain-text sibling is already pinned and already passes: 276-a-fence-opened-on-a-list-marker-line-body-below-the-content-column-3 puts x at this exact column and gets a code block holding x. The only difference here is which character follows the indentation, and no step of the walk looks at it. A reader that answers the two differently is recognizing a marker before it has established that the line is markup at all.

carve
- ```
  - x
  ```
html
<ul>
  <li>
    <pre><code>- x
</code></pre>
  </li>
</ul>

The same rule with the fence opened after a BLANK line inside the item rather than on the marker line. It is a SEPARATE row because readers reach the two through different machinery - one continues the item from its marker line, the other collects the item's content after a blank - so a fix applied to one is invisible to the other. A single row would let half of this rule stay broken and still read as done, which is the failure carve-php#1003 had to correct and the reason the ruling on carve-php#1007 asked for both shapes at once.

The item is loose and a is wrapped: the blank line stands between the lead and the fence, two of the item's blocks (PART 9 §17 L1).

carve
- a

  ```
  - x
  ```
html
<ul>
  <li><p>a</p>
    <pre><code>- x
</code></pre>
  </li>
</ul>

Both rows are carried by the engine tickets rather than presented as a cross-reader agreement. No engine answers both shapes this way today, and the three do not fail on the same one, so a red engine corpus job against these two is the measurement the engine work is made against rather than a regression.

A boundary line inside an open fence does not end the container ​

11 conformance fixtures

PART 0 P1 gives the attached fence its own extent. An interior blank is code payload, and a matching closer ends a closed fence. For an own-line +, the first later nonblank line that misses the host ends the attachment before that line is read (PART 0 S1 step 2, carve#5658 F06 ruling). The note, description, and item rows below exercise this boundary after the blank.

The same holds one construct over, for a body collected by INDENTATION rather than by a marker. §24 S1 MATCH PREFIXES places a line by the column it reaches and never by its first character; §24 S2 FENCED BODY then makes the line verbatim when the innermost matched container is a verbatim body; and §28 makes a comment fence's body verbatim and invisible. None of the three asks what the line looks like.

Seven rows, deliberately not one per cell. Each reaches a DIFFERENT collector, and in every reader those collectors are separate loops that a fix to one leaves untouched - which is the failure carve-php#1003 had to correct and the reason 278-a-list-marker-at-the-content-column-inside-an-open-fence needed two rows rather than one. Each of the three fence spellings appears, because the fence kind is a real axis: a reader can survive a code fence and sever a colon fence at the same boundary.

The seventh row arrived late, and why it did is worth recording. The list + collector is the largest severing group of the whole class, and it was the one cell this category could not pin, because the executable spec severed it too: its +-attach extent helpers were spelled twice and only one of the two consulted any fence state (carve#982). A checker is not an argument - THE EXECUTABLE ARTIFACTS DECIDE NOTHING - but a row whose expectation nothing in the repo could hold is not reviewable either. With the checker corrected against L3 the cell became committable, and it is committed here.

A definition line inside an attached code fence ​

The worst of them, and the reason this category exists. [^z]: zz sits inside an open code fence, so §24 S2 and §28 make it verbatim text: it defines nothing, and §17 L3's boundary list does not name a definition line at ALL, so nothing here ends the attached block early. The note body holds the whole fence.

The + attach into a footnote body is already pinned by 66-footnote-with-multiple-blocks-2; this row only says what a fence inside that attached block does.

What the three readers do instead is worth stating, because it is not a near miss: each of them ends the note body at the definition line, the fence is left unterminated, and b escapes the note entirely to become the document's FIRST block - printed ahead of the paragraph that references the note. A line of verbatim code text moved a block from the end of the document to the beginning.

carve
[^f]: n
+
```
a
[^z]: zz
b
```

see[^f]
html
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>n</p>
      <pre><code>a
[^z]: zz
b
</code></pre>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A line after the blank misses the note ​

The blank is code payload. The following b stands at the note's marker column, so it misses the note and ends this own-line attachment before the line is read (PART 0 S1 step 2, carve#5658 F06 ruling). The later fence-shaped line opens at document level.

This differs from the definition-line row above: that line is inside the fence before a blank, whereas b is the first line after the blank.

carve
[^f]: n
+
```
a

b
```

see[^f]
html
<p>b</p>
<pre><code>
see[^f]
</code></pre>

A line after the blank misses a definition body ​

The dd has the same own-line boundary as the note: b misses its content column after the retained blank. The closing fence-shaped line opens a new document block (PART 0 S1 step 2, carve#5658 F06 ruling).

carve
:: t
:  d
+
```
a

b
```
html
<dl>
  <dt>t</dt>
  <dd>
    <p>d</p>
    <pre><code>a

</code></pre>
  </dd>
</dl>
<p>b</p>
<pre><code></code></pre>

A definition line inside an attached COLON fence, in a block quote ​

The same boundary, a different fence kind, and a different answer - which is exactly why the fence kind is its own axis. A colon fence's body is NOT verbatim: it holds blocks, so [^z]: zz really is a definition. PART 9R collects it and leaves NO TRACE where it was written, and the same clause has it INTERRUPT the open paragraph, so b begins a new one rather than folding back into a.

Two paragraphs, therefore, where the control (the same document without the definition line) has one. What no reading gives is a div that ENDS at the definition line, which is the answer one reader produces.

carve
> q
+
:::
a
[^z]: zz
b
:::
html
<blockquote>
  <p>q</p>
  <div>
    <p>a</p>
  </div>
</blockquote>

A list marker at the body's column inside an item's colon fence ​

- m sits at the div body's own column zero, and the div body holds blocks, so the question is not §24 S2 this time but §10 I2: LIST MARKERS NEVER INTERRUPT. A marker line folds into the open paragraph as lazy continuation, and §10 I6 applies that to EVERY open paragraph, containers included. So the div holds one paragraph of three lines and ends at its closer.

This is the row that separates the fence kinds most sharply. Put the same marker inside a CODE fence at the same column and §24 S2 answers it instead, which is 278-a-list-marker-at-the-content-column-inside-an-open-fence. Two clauses, two paths, one answer: the line is content. All three readers close the div at the marker, open a real list, and leave a stray empty div behind at the end.

carve
- x
  :::
  a
  - m
  b
  :::
html
<ul>
  <li>x
    <div>
      <p>a
- m
b</p>
    </div>
  </li>
</ul>

A blank line inside an item's comment fence ​

§28 makes a comment fence's body verbatim AND invisible, so the blank line, the text around it and the closer are all inside the fence and none of them renders. The item is left holding nothing visible, which is <li></li> - 117-footnote-definition-inside-a-container-is-collected-2 and 16-reference-link-4 already pin that shape for an item whose only content is invisible.

The item also stays TIGHT: §17 L1 loosens on a blank-line-separated second PARAGRAPH, and there is no paragraph here at all. A reader that lets this blank line out of the fence gets the opposite of invisible - it prints the comment's body as two paragraphs.

carve
- %%%
  a

  b
  %%%
html
<ul>
  <li></li>
</ul>

A line after the blank misses a list item ​

The item keeps a and the blank as fence payload. The following b misses the item's content column, ending the own-line attachment under PART 0 S1 step 2 and the carve#5658 F06 ruling. The later fence-shaped line opens at document level and holds z.

carve
- x
+
```
a

b
```

z
html
<ul>
  <li>x
    <pre><code>a

</code></pre>
  </li>
</ul>
<p>b</p>
<pre><code>
z
</code></pre>

A blank line inside an item's INDENTED comment fence, with lead text ​

The sixth row above is the same fence with the same interior blank, and it passes everywhere. The difference is one word. There the fence opens ON the marker line, so the item holds nothing visible at all and there is no paragraph for looseness to wrap - the tight and the loose answer coincide, and the row cannot see this cell. Put x on the marker line and the two answers separate (carve#985).

§28 makes a comment fence's body verbatim AND invisible, so the blank line, the text around it and the closer are all fence content and none of them renders. §17 L1 loosens an item on a blank-line-separated second PARAGRAPH, and this item has no second paragraph anywhere: a line rendering nothing is neither a paragraph nor a separator (CARVE-P9-013 property 3), so it cannot BE the second one. The item is tight, and the document renders exactly one visible thing.

This reaches a collector none of the seven rows above touches. Those pin the extent of the ONE block a + attaches (§17 L3); this is the item collector's OWN blank-line decision, a separate reader of separate state, and a fix to the first leaves it untouched.

carve
- x
  %%%
  a

  b
  %%%
html
<ul>
  <li>x</li>
</ul>

The same item, with the blank line OUTSIDE the fence ​

The control the row above needs. Same item, same fence, same lead text; the blank line has moved past the closer, where it separates two paragraphs of the ITEM and §17 L1 does loosen.

Without this document the row above is satisfied by a reader that simply stops loosening whenever a comment fence appears in an item, which is not the rule and would be a second defect wearing the first one's answer. The two documents differ only in which side of the closer the blank line sits on, and they must answer differently.

carve
- x
  %%%
  a
  %%%

  b
html
<ul>
  <li><p>x</p>
    <p>b</p>
  </li>
</ul>

A blank line inside an item's indented colon fence, with lead text ​

The same collector, the other fence kind, and the kind is a real axis here as it is above: a colon fence's body is NOT verbatim, so this blank line is not invisible the way the comment fence's was. It genuinely separates two paragraphs

  • of the DIV.

What it does not do is give the ITEM a second paragraph. §17 L1 asks for a blank-line-separated second paragraph of the item, and the div is ONE block, so the item stays tight and keeps x unwrapped. Both answers are visible in the one output: loose inside the div, tight outside it, from a single blank line. A reader that lets that blank reach the item's looseness scan gets <p>x</p> and an otherwise identical div.

carve
- x
  :::
  a

  b
  :::
html
<ul>
  <li>x
    <div>
      <p>a</p>
      <p>b</p>
    </div>
  </li>
</ul>

The same item, with the blank line OUTSIDE the colon fence ​

The control for the colon spelling, and it is not redundant with the comment one: the two rows are the two branches of the same tracker, and a reader can carry one kind and miss the other, which is exactly the shape this whole category keeps finding.

Here the blank follows the closer, so the div is one block and b is a second paragraph of the item. The item is loose, and the div's own body - a alone, with no interior blank - is a single paragraph.

carve
- x
  :::
  a
  :::

  b
html
<ul>
  <li><p>x</p>
    <div>
      <p>a</p>
    </div>
    <p>b</p>
  </li>
</ul>

The first seven rows were carried by markup-carve/carve-js#884, markup-carve/carve-php#1049 and markup-carve/carve-rs#802 rather than presented as a cross-reader agreement, because no engine answered the class when they landed. All three engine tickets are closed now. The last four arrive the same way, from markup-carve/carve#985, and the pinned reference build is knowingly behind on the two that pin a defect - declared in resources/engine-pin-drift.txt rather than tolerated.

A container a lazy line folded into is still open ​

5 conformance fixtures

PART 1 S4's lazy branch ends "and NOTHING closes". That binds the lines AFTER the folded one as much as the folded one itself: a line that comes back to the container's content column is still that container's content, because nothing in the stack was ever closed (markup-carve/carve#980).

Every document already pinned for this rule put the flush-left line LAST - 270-a-real-div-in-a-container-and-the-flush-left-line-after-it does, and so does the block-quote category beside it. That spelling cannot tell a reader that folds and stays open from one that folds and then closes, so the rows below put a line after the fold, which is the only place the two differ.

carve
- x
  :::
  a
d
  b
  :::
html
<ul>
  <li>x
    <div>
      <p>a
d
b</p>
    </div>
  </li>
</ul>

Leaving the div unterminated does not change it. The fold and the reach are the same rule either way, and the closer only matters to a line that arrives after it:

carve
- x
  :::
  a
d
  b
html
<ul>
  <li>x
    <div>
      <p>a
d
b</p>
    </div>
  </li>
</ul>

THE CONTAINER KIND IS NOT A PARAMETER, here as in §24's clause. A block quote inside the item folds and stays open the same way, and its > prefix on the line after the fold reaches the same quote rather than a second one:

carve
- x
  > a
d
  > b
html
<ul>
  <li>x
    <blockquote><p>a
d
b</p></blockquote>
  </li>
</ul>

The same quote written on the item's MARKER line is a third row, because a marker-line container is collected through a different path:

carve
- > a
d
  > b
html
<ul>
  <li>
    <blockquote><p>a
d
b</p></blockquote>
  </li>
</ul>

CONTROL, and the sharp one. When NOTHING in the stack holds an open paragraph the line still ENDS the container, and the line after it is outside too. An empty ::: note has no paragraph, and the item's own paragraph was closed by the div opener, so both d and b are one top-level paragraph. This is the answer that must not move when the rule above is implemented: a reader that keeps the container open here has replaced one over-reach with another.

carve
- x
  ::: note
d
  b
html
<ul>
  <li>x
    <aside class="admonition note" aria-label="Note">

    </aside>
  </li>
</ul>
<p>d
b</p>

A fence keeps the blank line at the end of its content ​

7 conformance fixtures

A blank line inside a fence is content, and the last one is content too. That holds wherever the fence ends: at its own closer, at the end of a container, or at the end of the document.

Nothing pinned this before, and all three engines lost the blank independently - each by a different mechanism, and each only on some of the shapes below (markup-carve/carve-js#988, markup-carve/carve-php#1177, markup-carve/carve-rs#908).

carve
```
x

```
html
<pre><code>x

</code></pre>

An unterminated fence runs to the end of the document, and the blank before that end is still its content.

carve
```
x
html
<pre><code>x

</code></pre>

Inside a colon container the unclosed fence takes the container's closer as payload, and the blank before it is still content.

carve
::: note
```
x

:::
html
<aside class="admonition note" aria-label="Note">
  <pre><code>x

:::
</code></pre>
</aside>

The end of a list item ends the fence the same way its own closer would.

carve
- ```
  x
html
<ul>
  <li>
    <pre><code>x

</code></pre>
  </li>
</ul>

A fence opened on a nested list marker line keeps the blank too, even with no line before it and at any depth. A blank line supplies every indentation prefix (PART 0 S2), so nesting depth does not change which frame owns it (markup-carve/carve-php#3573, markup-carve/carve-rs#2925).

carve
- - ```

tail
html
<ul>
  <li>
    <ul>
      <li>
        <pre><code>
</code></pre>
      </li>
    </ul>
  </li>
</ul>
<p>tail</p>
carve
- - - ```

tail
html
<ul>
  <li>
    <ul>
      <li>
        <ul>
          <li>
            <pre><code>
</code></pre>
          </li>
        </ul>
      </li>
    </ul>
  </li>
</ul>
<p>tail</p>

Two blank lines before a nested item's closer remain fence content.

carve
- - ```


    ```

tail
html
<ul>
  <li>
    <ul>
      <li>
        <pre><code>

</code></pre>
      </li>
    </ul>
  </li>
</ul>
<p>tail</p>

A captioned quote holds more than one block ​

5 conformance fixtures

A caption makes its host a figure, and PART 9 §4b says a quote is no exception: the quote goes inside a <figure> and the caption becomes its <figcaption>, which is where the HTML Standard puts a quotation's attribution.

Nothing counts the quote's blocks. A multi-paragraph epigraph is ordinary, and so are a quoted list, a nested quote, a quoted code block and a quoted heading. Each one takes its caption the same way, in the same place.

This needed pinning because the executable spec refused every shape but a single paragraph, and no corpus document held any of the others - so the refusal was unreachable, npm run core:check reported every input conformant either way, and the gap was guarded by the absence of a fixture rather than by a decision (markup-carve/carve#1181, the markup-carve/carve#755 class).

carve
> Nothing in this world is certain except death and taxes.
>
> The second of the two arrives rather more often.
^ Benjamin Franklin
html
<figure>
  <blockquote>
    <p>Nothing in this world is certain except death and taxes.</p>
    <p>The second of the two arrives rather more often.</p>
  </blockquote>
  <figcaption>Benjamin Franklin</figcaption>
</figure>

A quoted list. The caption belongs to the quote as a whole, so the list stays the quote's only child and the caption sits outside it.

carve
> - Be skeptical.
> - Be kind.
^ House rules
html
<figure>
  <blockquote>
    <ul>
      <li>Be skeptical.</li>
      <li>Be kind.</li>
    </ul>
  </blockquote>
  <figcaption>House rules</figcaption>
</figure>

A nested quote. The caption attaches to the OUTER quote - the one whose marker column the caption line sits against - so the inner quote carries no caption of its own.

carve
> > I never said that.
^ Quoted in the report
html
<figure>
  <blockquote>
    <blockquote><p>I never said that.</p></blockquote>
  </blockquote>
  <figcaption>Quoted in the report</figcaption>
</figure>

A quoted code block. The <pre> is the quote's only child and the caption still lands beside the quote, which is the case that shows the rule is about the quote rather than about a paragraph.

carve
> ~~~
> git bisect run ./check
> ~~~
^ The release runbook
html
<figure>
  <blockquote>
    <pre><code>git bisect run ./check
</code></pre>
  </blockquote>
  <figcaption>The release runbook</figcaption>
</figure>

A quoted heading. The heading keeps its id, and PART 9R leaves it out of the implicit-reference index because it sits inside a quote - the caption does not change that either way.

carve
> ## Terms
>
> Delivery is at the discretion of the vendor.
^ Appendix B
html
<figure>
  <blockquote>
    <h2 id="Terms">Terms</h2>
    <p>Delivery is at the discretion of the vendor.</p>
  </blockquote>
  <figcaption>Appendix B</figcaption>
</figure>

Composite figures ​

11 conformance fixtures

A bare ::: figure container is ONE figure holding ordered panels (PART 9 §4c, the figure_group production): its direct captionable children - the figure and table nodes the unchanged inner caption rules build - are the panels, and the ^ line after the closing fence is the caption of the whole group. That closer is caption placement's sixth host (PART 9 §4), and the only ::: kind that takes one. The group renders class-first, the panels nested directly in the group figure - HTML's figure content model admits flow content beside a first-or-last figcaption, so no wrapper element sits between them.

carve
{#fig-x .columns-2}
::: figure
{#fig-x-a}
![one](a.png)
^ (a) One

{#fig-x-b}
![two](b.png)
^ (b) Two
:::
^ Figure #: Group caption
html
<figure class="carve-figure-group columns-2" id="fig-x">
  <figure class="carve-figure-panel" id="fig-x-a">
    <img src="a.png" alt="one">
    <figcaption>(a) One</figcaption>
  </figure>
  <figure class="carve-figure-panel" id="fig-x-b">
    <img src="b.png" alt="two">
    <figcaption>(b) Two</figcaption>
  </figure>
  <figcaption>Figure 1: Group caption</figcaption>
</figure>

The group is one numbering unit (PART 9R R5): its caption's # draws exactly one number from the label's sequence, and that draw also registers the panel ids for cross-references - the group's number plus a letter by panel order. Panels draw nothing themselves.

carve
{#fig-first}
![lead](lead.png)
^ Figure #: First

{#fig-x}
::: figure
{#fig-x-a}
![one](a.png)
^ (a) One

{#fig-x-b}
![two](b.png)
^ (b) Two
:::
^ Figure #: Second

See </#fig-x> and </#fig-x-a>.
html
<figure id="fig-first">
  <img src="lead.png" alt="lead">
  <figcaption>Figure 1: First</figcaption>
</figure>
<figure class="carve-figure-group" id="fig-x">
  <figure class="carve-figure-panel" id="fig-x-a">
    <img src="a.png" alt="one">
    <figcaption>(a) One</figcaption>
  </figure>
  <figure class="carve-figure-panel" id="fig-x-b">
    <img src="b.png" alt="two">
    <figcaption>(b) Two</figcaption>
  </figure>
  <figcaption>Figure 2: Second</figcaption>
</figure>
<p>See <a href="#fig-x">Figure 2</a> and <a href="#fig-x-a">Figure 2a</a>.</p>

A group without a caption is a valid, unnumbered group - no trailing figcaption is emitted.

carve
::: figure
![one](a.png)
^ (a) One

![two](b.png)
^ (b) Two
:::
html
<figure class="carve-figure-group">
  <figure class="carve-figure-panel">
    <img src="a.png" alt="one">
    <figcaption>(a) One</figcaption>
  </figure>
  <figure class="carve-figure-panel">
    <img src="b.png" alt="two">
    <figcaption>(b) Two</figcaption>
  </figure>
</figure>

A one-panel group is a valid parse, not an error (carve lint reports it in strict profiles as figure-group-single-panel).

carve
::: figure
![lone](l.png)
^ The only panel
:::
^ Figure #: One panel is valid
html
<figure class="carve-figure-group">
  <figure class="carve-figure-panel">
    <img src="l.png" alt="lone">
    <figcaption>The only panel</figcaption>
  </figure>
  <figcaption>Figure 1: One panel is valid</figcaption>
</figure>

Direct children that are not captionable hosts are plain group content, preserved in place between the panels - never silently dropped, never re-attached to a panel.

carve
::: figure
Both panels were shot on the same day.

{#fig-s-a}
![one](a.png)
^ (a) One

{#fig-s-b}
![two](b.png)
^ (b) Two
:::
^ Figure #: With a note between the panels
html
<figure class="carve-figure-group">
  <p>Both panels were shot on the same day.</p>
  <figure class="carve-figure-panel" id="fig-s-a">
    <img src="a.png" alt="one">
    <figcaption>(a) One</figcaption>
  </figure>
  <figure class="carve-figure-panel" id="fig-s-b">
    <img src="b.png" alt="two">
    <figcaption>(b) Two</figcaption>
  </figure>
  <figcaption>Figure 1: With a note between the panels</figcaption>
</figure>

The group caption takes the same allowance as every host (PART 9 §4): adjacent or exactly one blank line attaches, two blank lines detach and leave the ^ line an ordinary paragraph.

carve
::: figure
![one](a.png)
^ (a) One
:::


^ Figure #: Detached
html
<figure class="carve-figure-group">
  <figure class="carve-figure-panel">
    <img src="a.png" alt="one">
    <figcaption>(a) One</figcaption>
  </figure>
</figure>
<p>^ Figure #: Detached</p>

Only the figure kind hosts a caption at its closer. A ^ line after any other container's closing fence stays what it always was: ordinary paragraph content.

carve
::: note
Body text.
:::
^ Not a caption
html
<aside class="admonition note" aria-label="Note">
  <p>Body text.</p>
</aside>
<p>^ Not a caption</p>

An opener carrying a quoted title or a [label] does not match figure_group_open - it stays a generic Tier-2 container, metadata preserved losslessly (carve lint reports figure-group-opener-metadata), and its closer hosts no caption.

carve
::: figure "A titled figure div"
![one](a.png)
^ (a) One
:::
^ Not a group caption

::: figure [g]
Body.
:::
html
<div class="figure">
  <p class="admonition-title">A titled figure div</p>
  <figure>
    <img src="a.png" alt="one">
    <figcaption>(a) One</figcaption>
  </figure>
</div>
<p>^ Not a group caption</p>
<div class="figure">
  <p class="div-label">g</p>
  <p>Body.</p>
</div>

Groups do not nest. A bare ::: figure opener inside an open group's body is a generic container (carve lint reports figure-group-nested), and only the outer group numbers.

carve
::: figure
:::: figure
![one](a.png)
^ (a) One
::::
:::
^ Figure #: Outer only
html
<figure class="carve-figure-group">
  <div class="figure">
    <figure>
      <img src="a.png" alt="one">
      <figcaption>(a) One</figcaption>
    </figure>
  </div>
  <figcaption>Figure 1: Outer only</figcaption>
</figure>

Every captionable host panels the same way: a table (captioned or not) is wrapped in the panel figure, and a captioned code listing and a captioned display-math block already render as figures and take the panel class. An UNCAPTIONED quote is plain group content - which is how a quotation carries a figure number without a caption of its own: leave the quote bare and caption the group (PART 9 §4c).

carve
{#fig-m}
::: figure
|= Kind |= N |
| a    | 1 |

```js
const x = 1
```
^ A listing panel

$$`E = mc^2`
^ An equation panel

> Measured twice.

> Brevity.
^ A quoted panel
:::
^ Figure #: Mixed panels
html
<figure class="carve-figure-group" id="fig-m">
  <figure class="carve-figure-panel">
    <table>
      <thead>
        <tr><th scope="col">Kind</th><th scope="col">N</th></tr>
      </thead>
      <tbody>
        <tr><td>a</td><td>1</td></tr>
      </tbody>
    </table>
  </figure>
  <figure class="carve-figure-panel">
    <pre><code class="language-js">const x = 1
</code></pre>
    <figcaption>A listing panel</figcaption>
  </figure>
  <figure class="carve-figure-panel">
    <p><span class="math display" role="math">\[E = mc^2\]</span></p>
    <figcaption>An equation panel</figcaption>
  </figure>
  <blockquote><p>Measured twice.</p></blockquote>
  <figure class="carve-figure-panel">
    <blockquote><p>Brevity.</p></blockquote>
    <figcaption>A quoted panel</figcaption>
  </figure>
  <figcaption>Figure 1: Mixed panels</figcaption>
</figure>

A captionable host takes its number where the host begins, and a figure group begins at its opening fence - so the group draws its number before anything inside it does (pre-order). The only construction that can observe the difference is a numbered caption inside non-panel group content, which draws after the group even though its caption line sits above the group's in the source.

carve
:::: figure
::: note
![x](x.png)
^ Figure #: inner
:::
::::
^ Figure #: group
html
<figure class="carve-figure-group">
  <aside class="admonition note" aria-label="Note">
    <figure>
      <img src="x.png" alt="x">
      <figcaption>Figure 2: inner</figcaption>
    </figure>
  </aside>
  <figcaption>Figure 1: group</figcaption>
</figure>

Fenced code ​

1 conformance fixture

If the preceding {…} block-attribute line also sets title, that line wins — the opener header only fills title when the attribute line did not.

carve
{title="from the attribute line"}
```php "from the header"
code
```
html
<pre title="from the attribute line"><code class="language-php">code
</code></pre>

Admonitions ​

2 conformance fixtures

The quoted opener header is the only source of the visible admonition-title paragraph. A title="…" key on the preceding attribute line is an ordinary HTML title attribute on the wrapper (a hover tooltip) — a separate channel, not a fallback spelling, and it never collides with the opener header:

carve
{title="attr title"}
::: note "opener title"
Body.
:::
html
<aside class="admonition note" title="attr title" aria-labelledby="adm-1">
  <p class="admonition-title" id="adm-1">opener title</p>
  <p>Body.</p>
</aside>

As the first token after the fence, the bare [label] may sit directly against it (:::[First]), the same allowance a code fence makes for ```[NPM].

carve
:::[First]
First panel.
:::
html
<div>
  <p class="div-label">First</p>
  <p>First panel.</p>
</div>

A titled admonition skips an authored heading id ​

1 conformance fixture
carve
{#adm-1}
# H

::: warning "Careful"
body
:::
html
<section id="adm-1">
  <h1>H</h1>
  <aside class="admonition warning" aria-labelledby="adm-1-2">
    <p class="admonition-title" id="adm-1-2">Careful</p>
    <p>body</p>
  </aside>
</section>

Comments ​

3 conformance fixtures

Without a space before it, %% is literal - so percentages and a%%b are safe.

carve
50%% off and a%%b stay literal.
html
<p>50%% off and a%%b stay literal.</p>

%% inside a code span is verbatim.

carve
Run `a %% b` then done. %% gone
html
<p>Run <code>a %% b</code> then done.</p>

A trailing comment ends at the line break; the next line of the paragraph stays.

carve
foo %% note
bar
html
<p>foo
bar</p>

An unclosed inline run in a line block reaches the end of the block ​

4 conformance fixtures

An inline run with no closer renders to the end of its BLOCK. A line block is one block, so its line breaks are a rendering instruction rather than a boundary the inline parser can see (markup-carve/carve#1282). The run therefore carries the break, and what it carries is a NEWLINE: the break is inside the run, so it is the run's content and not a <br> the container promised.

carve
::: |
a `b
c d
:::
html
<div class="line-block">
  <p>a <code>b
c d</code></p>
</div>

The control is the same two lines as an ordinary paragraph, which every reader already agreed about. One rule across both containers is what this pins, and the line block needs no exception:

carve
a `b
c d
html
<p>a <code>b
c d</code></p>

And the control that keeps the container's promise intact: a run that DOES close leaves the break outside itself, where it hardens as every other line break in a line block does. These two documents differ by one backtick and answer differently, which is why both are here.

carve
::: |
a `b`
c d
:::
html
<div class="line-block">
  <p>a <code>b</code><br>
c d</p>
</div>

The rule is about runs, not about backticks: a math run spans the break the same way, and its content holds the newline too.

carve
::: |
a $`x
c d
:::
html
<div class="line-block">
  <p>a <span class="math inline" role="math">\(x
c d\)</span></p>
</div>

Line block inline note ​

1 conformance fixture

An inline note keeps the stanza's break rule when its content moves to the endnote.

carve
::: |
a ^[first
second] end
:::
html
<div class="line-block">
  <p>a <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> end</p>
</div>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>first<br>
second<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A line block takes a lazy line whatever its last payload line ​

2 conformance fixtures

An unclosed line block keeps a following lazy line in its quote even when its payload looks like a fence or heading (carve-php#3237). The payload is inline content.

carve
> ::: |
> ```
> x
after
html
<blockquote>
  <div class="line-block">
    <p><code>
x
after</code></p>
  </div>
</blockquote>
carve
> ::: |
> # h
> x
after
html
<blockquote>
  <div class="line-block">
    <p># h<br>
x<br>
after</p>
  </div>
</blockquote>

A line block in a note or description takes a lazy line whatever its last payload line ​

5 conformance fixtures

A payload line is inline content whatever host holds the line block, so a note or description body whose stanza ends in a fence-, heading- or attribute-shaped line still takes the lazy line below it (carve#4748).

carve
:: t
: > :::: |
  > ~~~
b
html
<dl>
  <dt>t</dt>
  <dd>
    <blockquote>
      <div class="line-block">
        <p>~~~<br>
b</p>
      </div>
    </blockquote>
  </dd>
</dl>
carve
r[^1]

[^1]: ::: |
  # h
b
html
<p>r<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <div class="line-block">
        <p># h<br>
b</p>
      </div>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
:: t
: ::: |
  ~~~
b
html
<dl>
  <dt>t</dt>
  <dd>
    <div class="line-block">
      <p>~~~<br>
b</p>
    </div>
  </dd>
</dl>
carve
:: t
: - ::: |
    # h
b
html
<dl>
  <dt>t</dt>
  <dd>
    <ul>
      <li>
        <div class="line-block">
          <p># h<br>
b</p>
        </div>
      </li>
    </ul>
  </dd>
</dl>
carve
:: t
: > ::: |
  > {.k}
b
html
<dl>
  <dt>t</dt>
  <dd>
    <blockquote>
      <div class="line-block">
        <p>{.k}<br>
b</p>
      </div>
    </blockquote>
  </dd>
</dl>

A line block behind nested markers takes a lazy line after a fence-shaped payload ​

5 conformance fixtures

A line block's payload is inline content whatever its shape, so a nested item whose line block ends in a fence-shaped line still takes the lazy line below it (carve#4661).

carve
- - ::: |
    ~~~
b
html
<ul>
  <li>
    <ul>
      <li>
        <div class="line-block">
          <p>~~~<br>
b</p>
        </div>
      </li>
    </ul>
  </li>
</ul>
carve
- 1. ::: |
     ~~~~ js
b
c
html
<ul>
  <li>
    <ol>
      <li>
        <div class="line-block">
          <p>~~~~ js<br>
b<br>
c</p>
        </div>
      </li>
    </ol>
  </li>
</ul>
carve
- - - ::: |
      ~~~
      x
b
html
<ul>
  <li>
    <ul>
      <li>
        <ul>
          <li>
            <div class="line-block">
              <p>~~~<br>
x<br>
b</p>
            </div>
          </li>
        </ul>
      </li>
    </ul>
  </li>
</ul>
carve
- a
  - - ::: |
      ~~~
b
html
<ul>
  <li>a
    <ul>
      <li>
        <ul>
          <li>
            <div class="line-block">
              <p>~~~<br>
b</p>
            </div>
          </li>
        </ul>
      </li>
    </ul>
  </li>
</ul>
carve
- - ::: |
    - ~~~
    x
b
html
<ul>
  <li>
    <ul>
      <li>
        <div class="line-block">
          <p>- ~~~<br>
x<br>
b</p>
        </div>
      </li>
    </ul>
  </li>
</ul>

A line block in a description item takes a lazy line after a definition-shaped payload ​

4 conformance fixtures

A line block's payload is inline content whatever its shape, so a line block in a list item, quote or nested description inside a description still takes the lazy line below an attribute- or definition-shaped payload line (carve#4748).

carve
:: t
: - ::: |
    {.k}
b
html
<dl>
  <dt>t</dt>
  <dd>
    <ul>
      <li>
        <div class="line-block">
          <p>{.k}<br>
b</p>
        </div>
      </li>
    </ul>
  </dd>
</dl>
carve
:: t
: > - ::: |
  >   {#i}
b
html
<dl>
  <dt>t</dt>
  <dd>
    <blockquote>
      <ul>
        <li>
          <div class="line-block">
            <p>{<span class="tag"><strong>#i</strong></span>}<br>
b</p>
          </div>
        </li>
      </ul>
    </blockquote>
  </dd>
</dl>
carve
:: t
: - - ::: |
      [x]: /u
b
html
<dl>
  <dt>t</dt>
  <dd>
    <ul>
      <li>
        <ul>
          <li>
            <div class="line-block">
              <p>[x]: /u<br>
b</p>
            </div>
          </li>
        </ul>
      </li>
    </ul>
  </dd>
</dl>
carve
:: t
: :: u
  : ::: |
    [^1]: n
b
html
<dl>
  <dt>t</dt>
  <dd>
    <dl>
      <dt>u</dt>
      <dd>
        <div class="line-block">
          <p>[^1]: n<br>
b</p>
        </div>
      </dd>
    </dl>
  </dd>
</dl>

A comment-only line in a line block is removed before any inline run ​

4 conformance fixtures

comment_line is a BLOCK - PART 1 lists it among the invisible blocks - so a comment-only body line is decided at the block layer, before the stanza reaches the inline parser. An unclosed verbatim run opened on an EARLIER line therefore cannot claim it, and a stray backtick cannot turn a comment into published text (markup-carve/carve#1333). The comment leaves an EMPTY VERSE LINE (PART 9 §23), and the run carries that line as a newline like every other break it swallows.

carve
::: |
a `b
%% secret
c
:::
html
<div class="line-block">
  <p>a <code>b

c</code></p>
</div>

The control with no run open is the shape §23 has always described and that nothing had ever pinned: the line is gone, and the stanza keeps its shape rather than losing a line.

carve
::: |
a
%% secret
c
:::
html
<div class="line-block">
  <p>a<br>
<br>
c</p>
</div>

A TRAILING comment is a different construct and answers differently. x %% secret is inline_comment (§21), not a comment line, and §21's third bullet is unconditional: inside a verbatim run there is no comment there at all, only two percent characters in content. These two documents differ only in where the %% sits on its line, which is why both are here.

carve
::: |
a `b
x %% secret
c
:::
html
<div class="line-block">
  <p>a <code>b
x %% secret
c</code></p>
</div>

The answer is §21's and not the container's, which is why there is no paragraph document beside these two: 26-comments-4 already pins a %% inside a code span as content, and the paragraph shape adds nothing a mutation of the rule can tell apart from it. One rule across both containers, as the unclosed-run documents above pin for the run itself.

An empty verse line is a LINE, not a break: it earns its <br> from the boundary above it like any other line, so a comment ending a stanza adds nothing after the break that already separates it from the line before. Two breaks on one boundary is what the section below refuses.

carve
::: |
a
%% c
:::
html
<div class="line-block">
  <p>a<br>
</p>
</div>

A terminal comment in a quote leaves no paragraph open ​

2 conformance fixtures

A line comment is an invisible block. When it is the quote's last block, an unmarked following line has no paragraph to continue and remains outside.

carve
> %% hidden
tail
html
<blockquote>

</blockquote>
<p>tail</p>

A closed comment fence is one opaque invisible block and has the same result; its body cannot reopen a paragraph in the quote.

carve
> %%%
> hidden
> %%%
tail
html
<blockquote>

</blockquote>
<p>tail</p>

A terminal comment line still leaves an empty verse line ​

1 conformance fixture

Removing a comment-only line happens before inline parsing but keeps the verse line itself. If an unclosed run reaches that terminal line, its content keeps the newline left by the emptied line.

carve
::: |
`
%%
:::
html
<div class="line-block">
  <p><code>
</code></p>
</div>

A line block's hard break keeps its backslash ​

3 conformance fixtures

A line block hardens every line boundary of its own accord, and a backslash break is NOT additive: hard_break = '\', newline consumes its own newline, so no soft break survives for §23 to convert and one boundary still produces one <br> (markup-carve/carve#1334). The backslash is not thereby redundant. PART 7 makes the whitespace run before it INTERIOR, so a \ is how a verse line keeps a LONE trailing space - and the canonical writer may not drop it, because a bare newline makes that space line-trailing, where PART 2 strips it and formatting the document destroys rendered content (PART 11 §7c).

carve
::: |
a \
b
:::
html
<div class="line-block">
  <p>a <br>
b</p>
</div>

A \ ALONE on a body line is how a stanza carries an empty verse line. The blank line is the one spelling that would end the stanza instead, so a writer that drops this backslash hands back one stanza as two.

carve
::: |
a
\
b
:::
html
<div class="line-block">
  <p>a<br>
<br>
b</p>
</div>

The control that bounds the rule: a TRAILING run of TWO OR MORE columns is already NBSP content under MEDIAL GAPS, so it survives with no backslash and the backslash carries nothing here. This is the document whose canonical form drops it.

carve
::: |
a  \
b
:::
html
<div class="line-block">
  <p>a&nbsp;&nbsp;<br>
b</p>
</div>

A line block's last body line keeps its backslash ​

4 conformance fixtures

PART 11 §7c lets the canonical writer spell a line block's hard_break as a BARE NEWLINE, because the container hardens every line boundary of its own accord (§23). The permission holds only where re-reading that newline yields the same tree, and at the END of a stanza it does not: §23 hardens the boundary BETWEEN two body lines, and the body's end is not one. A hard_break there is the author's own (PART 3), the newline after it belongs to the closing fence, and a writer that drops the backslash drops the break (markup-carve/carve-js#1172).

No space is involved. This is the shape the clause's first wording could not reach, because it enumerated the two cases where a bare newline is unsafe and both of them are about whitespace.

carve
::: |
a\
:::
html
<div class="line-block">
  <p>a<br>
</p>
</div>

A TRAILING run of TWO OR MORE columns is NBSP content under MEDIAL GAPS and survives a bare newline on its own, which is why it needs no backslash INSIDE a stanza - 345-a-line-block-s-hard-break-keeps-its-backslash-3 is that document. At the stanza's end the break is what is at stake rather than the spaces, so the same line answers the other way.

carve
::: |
a  \
:::
html
<div class="line-block">
  <p>a&nbsp;&nbsp;<br>
</p>
</div>

A LINE THAT ENDS IN A COMMENT IS EXEMPT, and the shape that shows why is an EMPTY comment line. The writer spells one as the marker plus a separator space, and PART 2 strips that space again on the way back in - so the LONE TRAILING SPACE case does not reach it: the space is inside the note rather than content the parser is about to lose, and stripping it leaves the same node. A backslash written to protect it lands INSIDE the note, where the block layer, which claims the whole line before the inline parser sees it, reads it back as the comment's own content. The same exemption is why a last body line ending in a comment takes no backslash either: the marker runs to the end of its own line, so there is no hard break there to spell.

carve
::: |
a
%%
b
:::
html
<div class="line-block">
  <p>a<br>
<br>
b</p>
</div>

And a boundary the author spelled \ is still a boundary, so it is still the breaks that decide which line is last. Here the last body line is the COMMENT: the backslash on a is there to hold the LONE trailing space, and the comment line below it is a line of its own. Asking the question of the soft-break conversion asks it where a \ never arrives, which kept the same note under a and dropped it under a \.

carve
::: |
a \
%% c
:::
html
<div class="line-block">
  <p>a <br>
</p>
</div>

A closed inline construct spanning a verse boundary ​

5 conformance fixtures

A line block hardens SOFT BREAKS, and §23's subject is the node: the only question at a boundary is whether a soft_break is there, never what encloses it. An emphasis run, a link label or a semantic span that spans a boundary encloses one - the newline is a node BESIDE the construct's text - so the break hardens exactly as it does with no construct around it (markup-carve/carve#1351).

carve
::: |
*Roses are red,
Violets are blue.*
:::
html
<div class="line-block">
  <p><strong>Roses are red,<br>
Violets are blue.</strong></p>
</div>

The control is DIFFERENT IN KIND rather than in depth, which is the whole of the rule. A verbatim run that closes on a LATER line spans the same boundary and does NOT harden it, because the newline is inside the run's own value and there is no node for the clause to convert. That completes the set above, and CLOSING is not what any of it turns on: a run that closes on the SAME line leaves the break outside itself and hardens, a run that closes on a later line and a run that never closes both hold the break in their value and do not. These two documents differ only in which construct spans the boundary and they answer differently:

carve
::: |
a `b
c` d
:::
html
<div class="line-block">
  <p>a <code>b
c</code> d</p>
</div>

No depth is a threshold either, so one stanza answers its boundaries the same way whether or not a construct is open across them. The pinned reading gave this document a bare newline and then a <br>:

carve
::: |
*Roses are red,
Violets are blue.*
And so are you.
:::
html
<div class="line-block">
  <p><strong>Roses are red,<br>
Violets are blue.</strong><br>
And so are you.</p>
</div>

A BACKSLASH BREAK IS NOT ADDITIVE holds at depth for the same reason it holds at the top: the backslash consumed the newline, so no soft break survives inside the construct either and ONE boundary still produces ONE break. An implementation that hardens by LINE BOUNDARY rather than by node writes two here:

carve
::: |
*Roses are red,\
Violets are blue.*
:::
html
<div class="line-block">
  <p><strong>Roses are red,<br>
Violets are blue.</strong></p>
</div>

A LINK LABEL AND A SEMANTIC SPAN HOLD THE SAME NODE and the rule reaches them for the same reason - every engine's tree puts a soft_break inside the link and inside the span. They were not pinned here at first, because the executable spec's brContent admitted no newline and so parsed no bracketed construct across a line boundary ANYWHERE, in a line block or in an ordinary paragraph: a fixture would have pinned that limitation rather than this rule. That is fixed (markup-carve/carve#1352), and the shapes are pinned under "A bracketed construct spanning a line boundary" below.

And LEADING WHITESPACE is still content inside the construct, so the two rules compose. An implementation that answers this by re-reading the construct's raw text loses the gap:

carve
::: |
*Roses are red,
  Violets are blue.*
:::
html
<div class="line-block">
  <p><strong>Roses are red,<br>
&nbsp;&nbsp;Violets are blue.</strong></p>
</div>

A container whose table ends on a continuation row ​

7 conformance fixtures

PART 1 S4 asks what a container's last BLOCK is, and a table is a table however its last row is spelled. §5 T6 gives a continuation row table_cells and joins them onto the row above, so it leaves no paragraph open and the container ends at a flush-left line (markup-carve/carve#1348).

carve
- | a |
  + b |
tail
html
<ul>
  <li>
    <table>
      <tbody>
        <tr><td>a b</td></tr>
      </tbody>
    </table>
  </li>
</ul>
<p>tail</p>

The control is the same table ending on a STANDARD row. It already answered this way everywhere, which is what made the pair above a contradiction rather than a second reading: two spellings of one table's last line, one question:

carve
- | a |
  | b |
tail
html
<ul>
  <li>
    <table>
      <tbody>
        <tr><td>a</td></tr>
        <tr><td>b</td></tr>
      </tbody>
    </table>
  </li>
</ul>
<p>tail</p>

A QUOTE answers the same way, and this is the half no implementation had right: all three engines and the executable spec kept tail inside the quote here while sending it out of the same quote ending on a standard row.

carve
> | a |
> + b |
tail
html
<blockquote>
  <table>
    <tbody>
      <tr><td>a b</td></tr>
    </tbody>
  </table>
</blockquote>
<p>tail</p>

The quote's own standard-row control, which is the document that decided it. A build that stops treating a standard row as a block inside a quote passes every other document in the corpus:

carve
> | a |
> | b |
tail
html
<blockquote>
  <table>
    <tbody>
      <tr><td>a</td></tr>
      <tr><td>b</td></tr>
    </tbody>
  </table>
</blockquote>
<p>tail</p>

And the quote answers the same WRAPPED as it does bare, because §5's clause puts the question to the quote's own body. An implementation that peels the > off one line loses the run above it and makes one document's answer depend on what is wrapped around it:

carve
:: t
:  > | a |
   > + b |
tail
html
<dl>
  <dt>t</dt>
  <dd>
    <blockquote>
      <table>
        <tbody>
          <tr><td>a b</td></tr>
        </tbody>
      </table>
    </blockquote>
  </dd>
</dl>
<p>tail</p>

The definition body without the quote is the same answer one container in:

carve
:: t
:  | a |
   + b |
tail
html
<dl>
  <dt>t</dt>
  <dd>
    <table>
      <tbody>
        <tr><td>a b</td></tr>
      </tbody>
    </table>
  </dd>
</dl>
<p>tail</p>

The other direction of the rule is unchanged and is what keeps this a parameter rather than a new constant answer. With no table above it the same line is prose, it leaves a paragraph open, and the flush-left line folds:

carve
- a
  + b |
tail
html
<ul>
  <li>a
+ b |
tail</li>
</ul>

A definition at a container's content column ​

7 conformance fixtures

§10 I5 makes a link or footnote definition an INTERRUPTER, so one written at a list item's content column ends the paragraph it sits under. Nothing about it closes the container: the container ends because the next line arrives at column 0 with no open paragraph left to fold into, which is PART 1 S4's own "otherwise" (markup-carve/carve#1350). And the definition BELONGS to the item at that column, so it registers.

carve
- a
  [r]: /u
tail

[r][]
html
<ul>
  <li>a
tail</li>
</ul>
<p><a href="/u">r</a></p>

The footnote kind registers the same way, but its body holds the note's own paragraph. A footnote body takes a lazy line like every container (markup-carve/carve#3885), so tail folds into the note:

A footnote body takes a lazy line like every container (markup-carve/carve#3885), so the unmarked line below folds into the note:

carve
- a
  [^f]: t
tail

x[^f]
html
<ul>
  <li>a</li>
</ul>
<p>x<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>t
tail<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

The control is I5's third column, and it is what makes the rule COLUMN-SCOPED rather than shape-scoped. One space to the left the same line is below the content column, where it is lazy paragraph text: it registers nothing, it leaves the paragraph open, and the flush-left line folds. These two documents differ by a single space and answer differently:

carve
- a
 [r]: /u
tail

[r][]
html
<ul>
  <li>a
tail</li>
</ul>
<p><a href="/u">r</a></p>

An abbreviation definition reads the same way at that column (carve#4865), so the flush-left line ends the item:

carve
- a
  *[A]: x
tail
html
<ul>
  <li>a
tail</li>
</ul>

A DEFINITION BODY answers exactly as the list item does, which is what keeps S4 doing the work rather than two container-specific rules:

carve
:: t
:  a
   [r]: /u
tail

[r][]
html
<dl>
  <dt>t</dt>
  <dd>a
tail</dd>
</dl>
<p><a href="/u">r</a></p>

A COMMENT at a definition body's content column is on I5's list too and ends the paragraph the same way:

carve
:: t
:  a
   %% c
tail
html
<dl>
  <dt>t</dt>
  <dd>a
tail</dd>
</dl>

The FOOTNOTE kind in a definition body is the cell that completes the section. Every other kind on I5's list is measured in both hosts and the two hosts agree wherever both were measured, but this one had only ever been measured in the list item. A rule stated for "a container" and pinned for one of its containers is the shape a later divergence hides in.

A footnote body takes a lazy line like every container (markup-carve/carve#3885), so the unmarked line below folds into the note:

carve
:: t
:  a
   [^f]: t
tail

x[^f]
html
<dl>
  <dt>t</dt>
  <dd>a</dd>
</dl>
<p>x<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>t
tail<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A bracketed construct spanning a line boundary ​

9 conformance fixtures

A [ closes at its matching ], and NOTHING in that scan is a line. The close is balanced, escape- and literal-span-aware (PART 3, link_text), and a line boundary is none of those things - link_text is inline_content, which folds across lines exactly as a paragraph does. So a link label, a semantic span, an image's alternative text, an inline note and an extension's content all admit a soft break like any other inline content.

The executable spec used to spell every one of those content runs with a ~newline guard, so it read all five as literal text and the same guard sat on the braced family beside them. Nothing pinned any of it: all three engines crossed the boundary, and the oracle alone did not (markup-carve/carve#1352).

carve
See [a
b](/u) here.
html
<p>See <a href="/u">a
b</a> here.</p>

A semantic span is the same run with a different tail:

carve
An [a
b]{.k} span.
html
<p>An <span class="k">a
b</span> span.</p>

The LABEL TEXT of a reference link crosses too. Its reference LABEL does not, and the two are pinned apart below:

carve
[a
b][r] resolves.

[r]: /u
html
<p><a href="/u">a
b</a> resolves.</p>

AN IMAGE'S ALT IS THE SAME RUN, so the two-line spelling of an image is still one image - and a paragraph whose whole content is one image is still the standalone image shape, not a wrapped one:

carve
![a
b](/i)
html
<img src="/i" alt="a
b">

and still a captionable host, for the same reason:

carve
![a
b](/i)
^ A caption.
html
<figure>
  <img src="/i" alt="a
b">
  <figcaption>A caption.</figcaption>
</figure>

An inline note's body is brContent too:

carve
A note ^[a
b] here.
html
<p>A note <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> here.</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>a
b<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

An inline extension closes at its own ] and reads the same content:

carve
:span[a
b] here.
html
<p><span class="ext-span">a
b</span> here.</p>

THE BRACED FAMILY IS THE SAME RULE ONE DELIMITER OVER. An editorial span and a forced span take inline content and close on their own brace pair, so a line boundary inside one is content there as well. They are pinned here rather than in a section of their own because the defect was one guard repeated, not five decisions:

carve
An {+a
b+} insertion.
html
<p>An <ins>a
b</ins> insertion.</p>
carve
A {/a
b/} run.
html
<p>A <em>a
b</em> run.</p>

A bracketed construct's identifiers stay on one line ​

5 conformance fixtures

The runs that admit a boundary are the CONTENT runs. A reference label, a footnote label and a crossref target are physical-line identifiers, matching the one-line definition marker they resolve against, and they keep the guard the content runs lost. These are controls: they answer the same before and after markup-carve/carve#1352, which is what makes them worth writing down beside it.

carve
[t][r
x]

[r x]: /u
html
<p>[t][r
x]</p>
carve
x[^f
g]

[^f g]: n
html
<p>x[^f
g]</p>

AND THE TAIL IS AN IDENTIFIER TOO, which is what keeps a captionable host honest. An image's ALT spans lines; its destination and its reference label do not, so a tail carrying a boundary is not an image tail and the paragraph is ordinary prose - it neither renders as an image nor hosts the caption line below it. These are the near misses a reading that joined the paragraph and stopped there would swallow:

carve
![a][r
x]
^ cap
html
<p>![a][r
x]
^ cap</p>
carve
![a](/i
q)
^ cap
html
<p>![a](/i
q)
^ cap</p>

AND A BLOCK BOUNDARY IS STILL A WALL. Admitting a newline into the scan says nothing about how far it may run: an unclosed [ is literal text, and the inline pass never sees past the block it is reading, so the run cannot reach the next paragraph to find a closer there.

carve
x [a
y

z
html
<p>x [a
y</p>
<p>z</p>

A bracketed construct spanning a verse boundary ​

3 conformance fixtures

The two rules compose, and this is the coverage "A closed inline construct spanning a verse boundary" above deferred. §23's subject is the soft_break NODE, and a link label spanning a stanza boundary encloses one, so the break hardens inside the label exactly as it does inside an emphasis run.

carve
::: |
See [Roses are red,
Violets are blue.](/u)
:::
html
<div class="line-block">
  <p>See <a href="/u">Roses are red,<br>
Violets are blue.</a></p>
</div>

A semantic span holds the same node:

carve
::: |
[Roses are red,
Violets are blue.]{.verse}
:::
html
<div class="line-block">
  <p><span class="verse">Roses are red,<br>
Violets are blue.</span></p>
</div>

And so does a braced construct, which is the point of the rule being about the node rather than about a list of enclosures:

carve
::: |
{+Roses are red,
Violets are blue.+}
:::
html
<div class="line-block">
  <p><ins>Roses are red,<br>
Violets are blue.</ins></p>
</div>

A continuation row joins the row above it, whatever its cells hold ​

6 conformance fixtures

What a + row joins is the row above it in the SOURCE, and the only line that declines is a delimiter row, which T7 consumes. A HEADER row is a row, so a continuation joins it - onto a native |= cell as readily as onto a data cell (markup-carve/carve#1354).

carve
|= a |= b |
+ cont |
html
<table>
  <thead>
    <tr><th scope="col">a cont</th><th scope="col">b</th></tr>
  </thead>
</table>

An all-header row that is not the table's first is joinable for the same reason:

carve
| a |
|= b |
+ c |
html
<table>
  <tbody>
    <tr><td>a</td></tr>
    <tr><th scope="row">b c</th></tr>
  </tbody>
</table>

THE DELIMITER ROW IS WHAT DECLINES, and it declines under a NATIVE header row too - which is what tells the two readings apart, since header-ness is present here and the answer is still prose. A continuation row needs a body row above pins the GFM spelling of the same decline:

carve
|= a |
| - |
+ cont |
html
<table>
  <thead>
    <tr><th scope="col">a</th></tr>
  </thead>
</table>
<p>+ cont |</p>

AN ALL-EMPTY CONTINUATION ROW IS ONE TOO. T2's minimum-cell guard is the STANDARD row's - it decides what OPENS a table - and a continuation row opens nothing and produces no <tr>, so a row whose every cell is empty appends nothing, which is what T6 already provides for:

carve
| a |
+ |
html
<table>
  <tbody>
    <tr><td>a</td></tr>
  </tbody>
</table>

The two-column twin is the control that shows the guard was answering one clause twice by column count: it was absorbed all along, because only the one-column shape reaches a one-cell test.

carve
| a | b |
+ | |
html
<table>
  <tbody>
    <tr><td>a</td><td>b</td></tr>
  </tbody>
</table>

And the empty row declines under a delimiter row exactly as a filled one does, so the two halves of this rule compose rather than override:

carve
| a | b |
| - | - |
+ |
html
<table>
  <thead>
    <tr><th scope="col">a</th><th scope="col">b</th></tr>
  </thead>
</table>
<p>+ |</p>

A container whose table ends on a joined header row ​

3 conformance fixtures

Once the reader accepts these rows, the container boundary follows from T6's IT LEAVES NO PARAGRAPH OPEN with no second predicate: the item's last block is a table however its last row is spelled, so the flush-left line leaves. This is the shape markup-carve/carve#1354 reported as a container-boundary defect - the predicate said "row" while the reader published prose - and it is answered by fixing the reader rather than by teaching the predicate the reader's rejections.

carve
- |= a |
  + b |
tail
html
<ul>
  <li>
    <table>
      <thead>
        <tr><th scope="col">a b</th></tr>
      </thead>
    </table>
  </li>
</ul>
<p>tail</p>

The empty spelling answers the same, which is the whole point of the two halves being one rule:

carve
- | a |
  + |
tail
html
<ul>
  <li>
    <table>
      <tbody>
        <tr><td>a</td></tr>
      </tbody>
    </table>
  </li>
</ul>
<p>tail</p>

A quote is asked its own body and answers alike:

carve
> |= a |
> + b |
tail
html
<blockquote>
  <table>
    <thead>
      <tr><th scope="col">a b</th></tr>
    </thead>
  </table>
</blockquote>
<p>tail</p>

A quote inside a quote is asked what it ends on ​

12 conformance fixtures

PART 1 S4 puts the question to a quote RECURSIVELY, and "recursively" has no depth in it: an outer quote whose last block is an inner quote is answered by what the INNER quote ends on. A heading ends it, so the flush-left line ends both quotes (markup-carve/carve#1355).

carve
> > # H
tail
html
<blockquote>
  <blockquote>
    <h1 id="H">H</h1>
  </blockquote>
</blockquote>
<p>tail</p>

The ONE-LEVEL SPELLING is the control that makes this a contradiction rather than a gap. It has always answered this way, and it is the same derivation:

carve
> # H
tail
html
<blockquote>
  <h1 id="H">H</h1>
</blockquote>
<p>tail</p>

A table answers alike, which is what says the rule is about the last block and not about headings:

carve
> > | a |
> > | b |
tail
html
<blockquote>
  <blockquote>
    <table>
      <tbody>
        <tr><td>a</td></tr>
        <tr><td>b</td></tr>
      </tbody>
    </table>
  </blockquote>
</blockquote>
<p>tail</p>

So does a thematic break:

carve
> > ---
tail
html
<blockquote>
  <blockquote>
    <hr>
  </blockquote>
</blockquote>
<p>tail</p>

And an INVISIBLE block, which leaves nothing on the page for a lazy line to continue and still ends the run:

carve
> > [r]: /u
tail

[r][]
html
<blockquote>
  <blockquote>

  </blockquote>
</blockquote>
<p>tail</p>
<p><a href="/u">r</a></p>

THREE DEEP IS THE SAME RULE, since nothing in it counts levels:

carve
> > > # H
tail
html
<blockquote>
  <blockquote>
    <blockquote>
      <h1 id="H">H</h1>
    </blockquote>
  </blockquote>
</blockquote>
<p>tail</p>

An earlier paragraph in the OUTER quote does not change the answer either - the question is about the LAST block, and the last block is the inner quote:

carve
> a
> > # H
tail
html
<blockquote>
  <p>a</p>
  <blockquote>
    <h1 id="H">H</h1>
  </blockquote>
</blockquote>
<p>tail</p>

A TABLE ENDING ON A CONTINUATION ROW answers alike, and it is the shape that says the question is asked with the inner quote's OWN line history rather than of its last line alone: + b | read on its own is prose (markup-carve/carve#1345), and read under the row above it is the row that finishes the table (§5 T6).

carve
> > | a |
> > + b |
tail
html
<blockquote>
  <blockquote>
    <table>
      <tbody>
        <tr><td>a b</td></tr>
      </tbody>
    </table>
  </blockquote>
</blockquote>
<p>tail</p>

The same at three levels, which is what says the history is carried per depth rather than for one:

carve
> > > | a |
> > > + b |
tail
html
<blockquote>
  <blockquote>
    <blockquote>
      <table>
        <tbody>
          <tr><td>a b</td></tr>
        </tbody>
      </table>
    </blockquote>
  </blockquote>
</blockquote>
<p>tail</p>

THE FOLD IS UNCHANGED WHERE A PARAGRAPH IS OPEN, which is the half depth was never a parameter of. These two are controls: they answered the same before this rule and after it.

carve
> > a
tail
html
<blockquote>
  <blockquote><p>a
tail</p></blockquote>
</blockquote>
carve
> > # H
> > a
tail
html
<blockquote>
  <blockquote>
    <h1 id="H">H</h1>
    <p>a
tail</p>
  </blockquote>
</blockquote>

AND A RUN A LINE DOES NOT REACH HAS ENDED. A later quote at the same depth is a NEW quote and inherits nothing from the one before it, so its first line is read as what it is - here prose, which opens a paragraph the flush-left line folds into. This is unanimous, and it is the near miss a reading that carried the history without ending it would take:

carve
> > | a |
> # H
> > + b |
tail
html
<blockquote>
  <blockquote>
    <table>
      <tbody>
        <tr><td>a</td></tr>
      </tbody>
    </table>
  </blockquote>
  <h1 id="H">H</h1>
  <blockquote><p>+ b |
tail</p></blockquote>
</blockquote>

A nested quoted term leaves no paragraph for a lazy line ​

1 conformance fixture

PART 0 S4 asks whether the innermost quoted leaf accepts lazy text. A definition term is no paragraph (carve#4861), so the unmarked line ends the quotes and is a paragraph of its own.

carve
> > :: term
tail
html
<blockquote>
  <blockquote>
    <dl>
      <dt>term</dt>
    </dl>
  </blockquote>
</blockquote>
<p>tail</p>

A quoted term takes a lazy line ​

3 conformance fixtures

A term is one line (carve#4861), so an unmarked plain line after it ends the quote, the quoted item or the item-hosted quote it misses and is a paragraph there.

carve
> :: t
tail
html
<blockquote>
  <dl>
    <dt>t</dt>
  </dl>
</blockquote>
<p>tail</p>
carve
> - :: t
tail
html
<blockquote>
  <ul>
    <li>
      <dl>
        <dt>t</dt>
      </dl>
    </li>
  </ul>
</blockquote>
<p>tail</p>
carve
- > :: term
tail
html
<ul>
  <li>
    <blockquote>
      <dl>
        <dt>term</dt>
      </dl>
    </blockquote>
  </li>
</ul>
<p>tail</p>

A quoted term takes no lazy marker or separator ​

3 conformance fixtures

A definition term takes no lazy line (carve#4861). An unprefixed list marker, separator or plain line ends the quote and is read as it would be without it.

carve
> - :: t
 - x
html
<blockquote>
  <ul>
    <li>
      <dl>
        <dt>t</dt>
      </dl>
    </li>
  </ul>
</blockquote>
<ul>
  <li>x</li>
</ul>
carve
> :: t
 : d
html
<blockquote>
  <dl>
    <dt>t</dt>
  </dl>
</blockquote>
<p>: d</p>
carve
> > :: t
 : d
html
<blockquote>
  <blockquote>
    <dl>
      <dt>t</dt>
    </dl>
  </blockquote>
</blockquote>
<p>: d</p>

A fence in a quote stores no continuation claim ​

11 conformance fixtures

PART 0 owner selection hands an unmarked line to the owner of the preceding ordinary line, and CARVE-P0-006 names a closed fence among the boundaries that store no such claim. A fence opener and a line inside an open fence are not ordinary lines either, so the unmarked line leaves every quote it was written under. Each nesting level is asked on its own, which is what the nested spellings below turn on.

§10 I4 opens the fence under a paragraph as at a block start, whether or not a closer follows, so the unmarked line leaves the quote in both arms (Blockquote lazy continuation stops at a fenced block).

carve
> a
> ```
> c
> ```
y
html
<blockquote>
  <p>a</p>
  <pre><code>c
</code></pre>
</blockquote>
<p>y</p>
carve
> > a
> > ```
> > c
> > ```
y
html
<blockquote>
  <blockquote>
    <p>a</p>
    <pre><code>c
</code></pre>
  </blockquote>
</blockquote>
<p>y</p>
carve
> > ```
> > c
> > ```
y
html
<blockquote>
  <blockquote>
    <pre><code>c
</code></pre>
  </blockquote>
</blockquote>
<p>y</p>
carve
> > ```
c
html
<blockquote>
  <blockquote>
    <pre><code></code></pre>
  </blockquote>
</blockquote>
<p>c</p>
carve
> > ```
> > x
y
html
<blockquote>
  <blockquote>
    <pre><code>x
</code></pre>
  </blockquote>
</blockquote>
<p>y</p>
carve
> # H
> ```
> c
> ```
y
html
<blockquote>
  <h1 id="H">H</h1>
  <pre><code>c
</code></pre>
</blockquote>
<p>y</p>

The control: an ordinary quoted line after the closed fence stores the claim again, and the unmarked line folds into its paragraph.

carve
> > ```
> > c
> > ```
> > b
y
html
<blockquote>
  <blockquote>
    <pre><code>c
</code></pre>
    <p>b
y</p>
  </blockquote>
</blockquote>

A COLON fence closes the same way, and each quote level is asked on its own: a closer written one level down ends that level's div and leaves the outer quote with nothing to hand the unmarked line.

carve
> > :::
> > :::
y
html
<blockquote>
  <blockquote>
    <div>

    </div>
  </blockquote>
</blockquote>
<p>y</p>
carve
> > ::: d
> > p
> > :::
y
html
<blockquote>
  <blockquote>
    <div class="d">
      <p>p</p>
    </div>
  </blockquote>
</blockquote>
<p>y</p>
carve
> > > ::: d
> > > p
> > > :::
y
html
<blockquote>
  <blockquote>
    <blockquote>
      <div class="d">
        <p>p</p>
      </div>
    </blockquote>
  </blockquote>
</blockquote>
<p>y</p>

The control again: an ordinary quoted line after the closed div stores the claim, and the unmarked line folds into its paragraph.

carve
> > ::: d
> > p
> > :::
> > b
y
html
<blockquote>
  <blockquote>
    <div class="d">
      <p>p</p>
    </div>
    <p>b
y</p>
  </blockquote>
</blockquote>

A fence a container inside a quote holds open stores no claim ​

12 conformance fixtures

Since markup-carve/carve#4860 a list marker opens a list in a list item, description body or footnote body and closes a body it misses, so the rows below that show a marker in such a body read that way.

CARVE-P0-013 names no depth and no host, so A fence in a quote stores no continuation claim answers the same way with a list item or a footnote body between the quote and the fence. What changes is only where the fence is spelled: at that container's content column rather than the quote's own.

The quote's tracker read a fence at column 0 and nothing else, so one container in, the opener, its payload and its closer all read as ordinary text and the unmarked line below kept a claim. The owner it kept then depended on depth - the fence's payload one deep, a paragraph inside the quote two deep, the document with no container in between. It is the document at every depth.

These documents place the opener at the host's content column. The same ownership rule applies to shifted openers, covered in A shifted fence in a quoted item stores no continuation claim. A fence-shaped run that remains paragraph text still permits lazy continuation.

carve
> - a
>
>   ```
>   x
flush
html
<blockquote>
  <ul>
    <li><p>a</p>
      <pre><code>x
</code></pre>
    </li>
  </ul>
</blockquote>
<p>flush</p>
carve
> - a
>   - b
>
>     ```
>     x
flush
html
<blockquote>
  <ul>
    <li>a
      <ul>
        <li><p>b</p>
          <pre><code>x
</code></pre>
        </li>
      </ul>
    </li>
  </ul>
</blockquote>
<p>flush</p>
carve
> - a
>
>   ```
>   x
>   ```
flush
html
<blockquote>
  <ul>
    <li><p>a</p>
      <pre><code>x
</code></pre>
    </li>
  </ul>
</blockquote>
<p>flush</p>
carve
> - a
>   - b
>
>     ```
>     x
>     ```
flush
html
<blockquote>
  <ul>
    <li>a
      <ul>
        <li><p>b</p>
          <pre><code>x
</code></pre>
        </li>
      </ul>
    </li>
  </ul>
</blockquote>
<p>flush</p>
carve
> - ```
>   x
flush
html
<blockquote>
  <ul>
    <li>
      <pre><code>x
</code></pre>
    </li>
  </ul>
</blockquote>
<p>flush</p>
carve
> [^f]: t
>
>   ```
>   x
flush
html
<blockquote>

</blockquote>
<p>flush</p>
carve
> - a
>
>   ```
>   x
>   ```
>
>   z
flush
html
<blockquote>
  <ul>
    <li><p>a</p>
      <pre><code>x
</code></pre>
      <p>z
flush</p>
    </li>
  </ul>
</blockquote>
carve
> > - a
> >
> >   ```
> >   x
flush
html
<blockquote>
  <blockquote>
    <ul>
      <li><p>a</p>
        <pre><code>x
</code></pre>
      </li>
    </ul>
  </blockquote>
</blockquote>
<p>flush</p>
carve
> - a
> - ```
>   x
flush
html
<blockquote>
  <ul>
    <li>a</li>
    <li>
      <pre><code>x
</code></pre>
    </li>
  </ul>
</blockquote>
<p>flush</p>
carve
> - a
>
>   ```
>   x
> after
flush
html
<blockquote>
  <ul>
    <li><p>a</p>
      <pre><code>x
</code></pre>
    </li>
  </ul>
  <p>after
flush</p>
</blockquote>
carve
> :  a
>
>    ```
>    x
flush
html
<blockquote>
  <p>:  a</p>
  <pre><code>x
</code></pre>
</blockquote>
<p>flush</p>

The ninth pair is the same rule one quote deeper, and the tenth is a fence on a SIBLING item's marker line: the quote's paragraph state there is the first item's and says nothing about the second, so §10 I4 asks for no closer.

The last two are controls, and both keep flush inside the quote. In the first the host ends at > after, an ordinary quoted line, which stores the claim again. In the second there is no host at all: : a with no :: term above it is a paragraph, so the indented run is paragraph text and opens nothing.

The pair before them is the other control: an ordinary quoted line after the closed fence stores the claim again, and flush folds into the item that holds it.

The last pair turns on WHOSE paragraph a marker meets. Only a list item's gives way to one, so at a description body's column under its own open paragraph the same - ``` is ordinary text: nothing opens and flush folds into that paragraph.

A DESCRIPTION BODY IS NOT PINNED AS A HOST. Its own column would put a fence where the quote cannot see it too, but whether a : line opens a body at all depends on the term's list still being open, and that list ends at a blank followed by anything, at a block opener, and at an indented list written before any description, while surviving text that folds into the term. Until the oracle carries that state the host stays out, and these two documents are the controls for its absence.

carve
> :: t
> :  d
>    - ```
>      x
flush
html
<blockquote>
  <dl>
    <dt>t</dt>
    <dd>
      <p>d</p>
      <ul>
        <li>
          <pre><code>x
</code></pre>
        </li>
      </ul>
    </dd>
  </dl>
</blockquote>
<p>flush</p>

Depth three is pinned in tests/a-fence-in-a-quote-stores-no-continuation-claim.test.mjs rather than here. The pinned reference build measures a lazily folded line inside a quoted nested item against a re-indented source, so at that depth its offsets run past the end of the document - a position defect a plain > - a / > - b / y already carries, independent of this rule, and one a corpus document would report through the AST position gate instead of through the drift ledger.

A shifted fence in a quoted item stores no continuation claim ​

4 conformance fixtures

CARVE-P0-014 gives an unmarked column-0 line to the document when a code or raw fence is open, even when the opener sits past the quoted item's content column. Quote depth and opener indentation do not preserve a continuation claim. A shifted run under the item's paragraph opens a fence too, so it permits no lazy continuation either, and a later quoted run opens a fence of its own.

carve
> - a
>
>     ```
>     x
flush
html
<blockquote>
  <ul>
    <li><p>a</p>
      <pre><code>x
</code></pre>
    </li>
  </ul>
</blockquote>
<p>flush</p>
carve
> - a
>
>     ~~~
>     x
z
>     b
>     ~~~
html
<blockquote>
  <ul>
    <li><p>a</p>
      <pre><code>x
</code></pre>
    </li>
  </ul>
</blockquote>
<p>z</p>
<blockquote>
  <p>b</p>
  <pre><code></code></pre>
</blockquote>
carve
> > - a
> >
> >     ```=html
> >     x
flush
html
<blockquote>
  <blockquote>
    <ul>
      <li><p>a</p>
        x
      </li>
    </ul>
  </blockquote>
</blockquote>
<p>flush</p>
carve
> - a
>     ```
>     x
flush
html
<blockquote>
  <ul>
    <li>a
      <pre><code>x
</code></pre>
    </li>
  </ul>
</blockquote>
<p>flush</p>
3 conformance fixtures

PART 8 ranks links at 5 and emphasis markers at 7, so a link is resolved before the emphasis scan reaches it. A slash inside the label is already label text by then, and the slash outside the bracket has no partner left to pair with, so it stays literal.

carve
/[a/](/u)
html
<p>/<a href="/u">a/</a></p>
carve
/a/
html
<p><em>a</em></p>
carve
/[a](/u)/
html
<p><em><a href="/u">a</a></em></p>
6 conformance fixtures

link_title subtracts the closing quote alone, and character is any Unicode character, so a newline is inside the run. quoted_value subtracts newline and CARVE-P4-006 says so. The two slots are not one rule, and neither spelling is the other's default.

image_title = link_title is one production defined by reference, so an image title wraps on the same terms, and an escaped quote inside a wrapped title is still the literal quote. A BLANK line is a different matter: it ends the paragraph, so it ends the title with it. That case is pinned in tests/a-link-title-crosses-a-soft-wrap.test.mjs rather than here, because the declining bracket run it leaves behind reaches an engine position gap this rule has nothing to do with (markup-carve/carve-php#2713).

carve
[a](/u "t
u")
html
<p><a href="/u" title="t
u">a</a></p>
carve
[a](/u 't
u')
html
<p><a href="/u" title="t
u">a</a></p>
carve
![a](/i "t
u")
html
<img src="/i" alt="a" title="t
u">
carve
[a](/u "t\"
u")
html
<p><a href="/u" title="t&quot;
u">a</a></p>
carve
[a]{k="t
u"}
html
<p>[a]{k=“t
u”}</p>

A reference definition does not follow. The bound there is the prose above reference_definition, which puts both of its roles on one line, rather than the production's closing newline: a wrapped title would satisfy that terminal with the line break after it. So the definition declines and both lines are prose.

carve
[a][r]

[r]: /u "t
u"
html
<p>[a][r]</p>
<p>[r]: /u “t
u”</p>

A block at a container's content column ends the paragraph, whatever it renders ​

6 conformance fixtures

The content column IS the container body's column 0 (§24 C3), so a line there is read as a BLOCK - and a block ends the paragraph above it. What the block RENDERS is not a parameter: a comment, a definition and an attribute block all render nothing and all three end the paragraph, none of them closes the container, and the container ends because the FOLLOWING line arrives at DOCUMENT column 0 with nothing to fold into (markup-carve/carve#1350, markup-carve/carve#1357).

An ATTRIBUTE BLOCK is the control that decides the argument, because it is invisible and every implementation already ends the item on it:

carve
- a
  {.k}
tail
html
<ul>
  <li>a</li>
</ul>
<p>tail</p>

So a COMMENT answers alike. It ends the paragraph and not the item; tail ends the item because it is at column 0:

carve
- a
  %% c
tail
html
<ul>
  <li>a
tail</li>
</ul>

The FENCE spelling travels with its opener (§24 C3), so it answers the same:

carve
- a
  %%% c
  %%%
tail
html
<ul>
  <li>a</li>
</ul>
<p>tail</p>

THE RULE IS OVER THE BLOCK, NOT OVER ITS FIRST LINE. A footnote definition's indented body continuation is part of that definition - the footnote parser consumes it and permits no lazy continuation into it - so nothing of the item's is open across any of it:

A footnote body takes a lazy line like every container (markup-carve/carve#3885), so the unmarked line below folds into the note:

carve
- a
  [^f]: t
    more
tail

x[^f]
html
<ul>
  <li>a</li>
</ul>
<p>x<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>t
more
tail<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

which is the same answer the ONE-LINE spelling of that definition already gets, and that is the point - two spellings of one definition had been answering differently:

carve
- a
  [^f]: t
tail

x[^f]
html
<ul>
  <li>a</li>
</ul>
<p>x<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>t
tail<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A LINK reference definition has no body - it is one line in Carve - so an indented line under it is ordinary item text and reopens the paragraph. This is the control that says the rule is about the BLOCK'S EXTENT and not about indentation, and it is unanimous:

carve
- a
  [r]: /u
    "T"
tail

[r][]
html
<ul>
  <li>a
“T”
tail</li>
</ul>
<p><a href="/u">r</a></p>

What a content-column block does not reach ​

2 conformance fixtures

A comment at the content column closes the item's paragraph and retains nothing (CARVE-P0-024, CARVE-P0-005). The following below-column line opens a document paragraph:

carve
- a
  %% c
 b
html
<ul>
  <li>a
b</li>
</ul>

And a line AT the content column after the block is the item's own second paragraph, which it was before:

carve
- a
  [^f]: t
    more
  b

x[^f]
html
<ul>
  <li>a</li>
</ul>
<p>x<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>t
more
b<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A footnote definition's block runs to the end of its body ​

2 conformance fixtures

The rule is over the BLOCK, and a footnote definition's block is whatever the footnote parser consumes - which may be more than one block of body. A blank between the note's blocks is INTERIOR to that block, so it hands nothing back to the container (markup-carve/carve#1363). The note's last paragraph is still open, and a footnote body takes a lazy line like every container (markup-carve/carve#3885), so the flush-left line folds into it.

carve
- a
  [^f]: t

    more
tail

x[^f]
html
<ul>
  <li>a</li>
</ul>
<p>x<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>t</p>
      <p>more
tail<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A LINK reference definition is the control, and it does not move. It has no body, so its block is the one line: the blank falls OUTSIDE it, the indented line below is the item's own second paragraph, and the flush-left line folds into that. Every implementation already answers this way, which is what makes it the control - the difference is the body, not the indentation and not the blank:

carve
- a
  [r]: /u

    more
tail

[r][]
html
<ul>
  <li><p>a</p>
    <p>more
tail</p>
  </li>
</ul>
<p><a href="/u">r</a></p>

A collected definition closes the item paragraph ​

4 conformance fixtures

A link or footnote definition at an item's content column is an I5 block and ends the paragraph above it. A following nonzero line below that column has no paragraph to continue, so the item closes; §24 C3 reserves that path for a comment. Here column 1 is below the bullet's content column 2.

carve
- a
  [r]: /u
 more
tail
html
<ul>
  <li>a
more
tail</li>
</ul>

The bare decimal-dot marker claims the same two columns as the bullet, so it has the same boundary rather than the three-column boundary of 1. .

carve
. a
  [r]: /u
 more
tail
html
<ol>
  <li>a
more
tail</li>
</ol>

A footnote body begins two columns beyond its definition. For 1. the definition is at column 3 and its body at column 5; column 4 is item prose, so it reopens the paragraph and the flush-left line folds into it.

carve
1. a
   [^f]: note
    more
tail
html
<ol>
  <li>a</li>
</ol>

At the body column the line remains part of the footnote block and opens no item paragraph. The flush-left line is consequently outside the item.

A footnote body takes a lazy line like every container (markup-carve/carve#3885), so the unmarked line below folds into the note:

carve
- a
  [^f]: note
    more
tail

see[^f]
html
<ul>
  <li>a</li>
</ul>
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>note
more
tail<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A container's span ends at its last placed child ​

2 conformance fixtures

PART 12 §4 ends a container "at their closer, or at their last child when they have no closer", and a list has no closer. A definition written at an item's content column is nonetheless collected by PART 12 §7 and hoisted to the DOCUMENT, so it leaves the list entirely; the list's last placed child is still the item above it.

Every engine ended the list after the definition instead, which put the same offsets in two nodes at once - the list and its own document-level sibling - and a consumer resolving a position to a node got two answers. Ruled at markup-carve/carve#1522: hoisting breaks the correspondence between tree nesting and source nesting, and a span follows the TREE. The accepted cost is that a list reports a shorter extent than the author typed, which is worse for folding and better for anything that has to resolve a position.

The HTML below is what the hoisting already produced; the pair is here because the SPANS the same document publishes are what moved.

carve
- a

  [r]: /u

see [text][r]
html
<ul>
  <li>a</li>
</ul>
<p>see <a href="/u">text</a></p>

An attribute block that attaches to nothing is the same question with no ruling needed, because §4 already names the construct: "a following line terminator, blank line, or unattached attribute block does not [belong] and is excluded". The {.x} below reaches no block - PART 9 §15 A4 drops it and reports unattached-block-attribute - so it yields no child, and the list that covered it was covering source nothing in it owns (markup-carve/carve#1524).

carve
- a

  {.x}

tail
html
<ul>
  <li>a</li>
</ul>
<p>tail</p>

A definition list ends at its last placed child too ​

2 conformance fixtures

A definition_list has no closer, so PART 12 §4 ends it at its last placed definition_term or definition_description - the same sentence that governs the list above. It used to be the one container that answered otherwise: a floating attribute is scoped to the container that holds it (markup-carve/carve#1281), so the attribute line below was one the definition list had consumed, and consuming it was read as owning it.

Scope and extent are different questions. Scope decides which blocks an attribute may reach and answers "not past this container"; extent decides which source a node claims and answers "not past my last child". The {.k} below attaches to nothing, leaves no attributes anywhere, and is the unattached attribute block §4 excludes by name - exactly as it is under a bullet item. Ruled at markup-carve/carve#1530.

The HTML is unchanged; the pair is here because the SPANS the same document publishes are what moved.

carve
:: t
:  d
   {.k}
tail
html
<dl>
  <dt>t</dt>
  <dd>d</dd>
</dl>
<p>tail</p>

A definition written at the description's content column is the other half, and it is the shape markup-carve/carve#1522 ruled one container over: PART 12 §7 hoists it to the DOCUMENT, so it leaves the definition list and becomes its sibling while its own span still sits inside the source the list encloses. The list ends where its description ends, and the offsets after that belong to the link_reference_definition alone.

carve
:: t
:  a
   [r]: /u
tail

[r][]
html
<dl>
  <dt>t</dt>
  <dd>a
tail</dd>
</dl>
<p><a href="/u">r</a></p>

A marker at an item content column opens a sublist, first in the item or not ​

3 conformance fixtures

PART 9 §24 C3 is the rule: "AT content_column: dedented to the body's column 0, a block opener nests and a list marker opens a sublist", and it holds "whether or not a blank line precedes the child". §10 I2 defers to it by name rather than competing with it - "TIGHT NESTED LISTS UNAFFECTED: an indented marker inside an open list ITEM opens a sublist with no blank line - that is §24 C3 (content column), not this relation" - and the clause closes by calling the content-column model's minimum-column boundary while deeper block bases now follow Djot-style leniency.

All three engines applied it to the FIRST marker in an item and no other. Each hands the sub-list off to the list parser and the rest of the body back as a further chunk, so the first marker met no open paragraph while every later one met §10 I2 with one open and folded. Two documents differing only by a sub-list that had already been closed then disagreed about what their shared last line was - and no answer can depend on a container that has already ended (markup-carve/carve#1517).

The - z below is closed by the blank line long before - s1 is read. The ticket's own spelling put a table there instead, which made the cause look like something about tables; the blank line isolates it.

carve
- o
  - z

  para
  - s1
html
<ul>
  <li><p>o</p>
    <ul>
      <li>z</li>
    </ul>
    <p>para</p>
    <ul>
      <li>s1</li>
    </ul>
  </li>
</ul>

One line shorter is the other half of the pair, and it always opened a sublist - - s1 is the item's first marker there. The two now agree, which is the whole point.

carve
- o

  para
  - s1
html
<ul>
  <li><p>o</p>
    <p>para</p>
    <ul>
      <li>s1</li>
    </ul>
  </li>
</ul>

Column 0 does not move. §24 C3 is a divergence for a container's CONTENT column, and the top level is §10 I2, where a marker still folds into an open paragraph.

carve
| a |
para
- s1
html
<table>
  <tbody>
    <tr><td>a</td></tr>
  </tbody>
</table>
<p>para
- s1</p>

A container starts at its opening markup even where its first child is unplaced ​

1 conformance fixture

The first child is tab gap, produced from tab<TAB>gap. The tab occupies one display column and becomes a plain space inside the merged text value. No contiguous source slice holds that value, so the text omits pos. The paragraph still starts at the beginning of its first line, before the placed break and comment (CARVE-P12-019).

carve
::: |
tab	gap
%%
:::
html
<div class="line-block">
  <p>tab gap<br>
</p>
</div>

A container ends at the markup that closes it even where its last child is unplaced ​

1 conformance fixture

The last child is tab gap, produced from tab<TAB>gap. It omits pos because its space was synthesized from a tab. The paragraph ends at offset 16, where that source line ends, rather than offset 9, where the preceding break ends (CARVE-P12-020).

carve
::: |
%%
tab	gap
:::
html
<div class="line-block">
  <p><br>
tab gap</p>
</div>

A definition behind an alternating container prefix registers at the innermost content column ​

4 conformance fixtures

Which container's content_column a line reaches is decided by PART 9 §24 C5's dedent chain: every container strips its own prefix and hands the residue down, so the question is asked of the innermost container in the coordinates it was handed. The shape of the prefix above it - how many quotes and list items it alternates, in what order, and how deep - is not a parameter, and a definition at that column registers exactly as §10 I5 says (markup-carve/carve#1368).

carve
- > - - x
  >     [r]: /url

See [r][].
html
<ul>
  <li>
    <blockquote>
      <ul>
        <li>
          <ul>
            <li>x</li>
          </ul>
        </li>
      </ul>
    </blockquote>
  </li>
</ul>
<p>See <a href="/url">r</a>.</p>

The FOOTNOTE kind of the same shape, kept beside the link because a reader that sorts definitions by kind can pass on the half it gets right.

carve
- > - - x
  >     [^f]: note

See [^f].
html
<ul>
  <li>
    <blockquote>
      <ul>
        <li>
          <ul>
            <li>x</li>
          </ul>
        </li>
      </ul>
    </blockquote>
  </li>
</ul>
<p>See <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a>.</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>note<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

The COLUMN control: a heading written at that same column is a block inside the innermost item. It says the line reaches the column, so a reader that declines the definition there is answering about the line's spelling rather than about its column - which §24 C3 refuses.

carve
- > - - x
  >     # h
html
<ul>
  <li>
    <blockquote>
      <ul>
        <li>
          <ul>
            <li>x
              <h1 id="h">h</h1>
            </li>
          </ul>
        </li>
      </ul>
    </blockquote>
  </li>
</ul>

The PEEL control: the same body with the outer list item removed, which is precisely what C5 says that item hands down. Every implementation registers here, so a reader that declines the first case answers one document two ways.

carve
> - - x
>     [r]: /url

See [r][].
html
<blockquote>
  <ul>
    <li>
      <ul>
        <li>x</li>
      </ul>
    </li>
  </ul>
</blockquote>
<p>See <a href="/url">r</a>.</p>

Line blocks ​

2 conformance fixtures

Nested blocks keep ordinary soft-break behavior, and leading whitespace is not treated as alignment.

carve
:::: \
  indented
next

::: note
a
b
:::
::::
html
<div class="hardbreaks">
  <p>indented<br>
next</p>
  <aside class="admonition note" aria-label="Note">
    <p>a
b</p>
  </aside>
</div>

The layout preservation comes from the | type token on the opener. A plain ::: block carrying the line-block class from an attribute line is an ordinary div that happens to have that class - the class is a CSS hook, and no stylesheet in the toolchain defines it.

carve
{.line-block}
:::
one
two
:::
html
<div class="line-block">
  <p>one
two</p>
</div>

Inline code ​

1 conformance fixture

The opener is a maximal run of backticks and closes only on a run of the same length. A run with no matching closer is not literal text: it opens a verbatim span that runs to the end of the block. A ``` on a line of its own is different: it is a fence opener, so it interrupts the paragraph and opens a code block that runs to the end of the document.

carve
text
```
code
html
<p>text</p>
<pre><code>code
</code></pre>

Generic divs ​

3 conformance fixtures

An inline attribute block on the fence line is not a div: the line is paragraph text, and the bare ::: below it opens a div of its own (carve#4863).

carve
::: {.sidebar}
not a div
:::
html
<p>::: {.sidebar}
not a div</p>
<div>

</div>

The type word is a grammar identifier, so it may start with an underscore.

carve
::: _box
content
:::
html
<div class="_box">
  <p>content</p>
</div>

A bare type word becomes a class, so it may start with an ASCII digit just as an explicit class may. This preserves a valid imported HTML class. Generated heading ids remain conservative and still prefix digit-leading slugs with s-.

carve
::: 123
content
:::
html
<div class="123">
  <p>content</p>
</div>

An unclosed bare colon fence opens a div ​

1 conformance fixture

A fence with no type word is still an opener, and an opener with no closer ahead of it still opens: the container runs to the end of the input and closes there, exactly as a labeled one does (PART 9 §12, PART 2). Section 12 used to carve out the bare spelling and call it literal text, which no engine ever implemented and which PART 2 had already superseded; the shape went unpinned long enough for the two clauses to disagree in writing (carve#1717).

carve
before
:::
after
html
<p>before</p>
<div>
  <p>after</p>
</div>

A bare colon run interrupts a paragraph whether or not a line follows it ​

7 conformance fixtures

A ::: opener is not guarded (§10 I4), so a bare run after a paragraph opens a div even as the last line of its container. It holds in a list item and a block quote as at the top level (markup-carve/carve#2151).

carve
text
not a div
:::
html
<p>text
not a div</p>
<div>

</div>
carve
- a
  :::
html
<ul>
  <li>a
    <div>

    </div>
  </li>
</ul>
carve
> a
> :::
html
<blockquote>
  <p>a</p>
  <div>

  </div>
</blockquote>

The empty div leaves no paragraph open, so a flush-left line after it closes the item, and a caption ends at the run as it ends at any interrupting block.

carve
- a
  :::
y
html
<ul>
  <li>a
    <div>

    </div>
  </li>
</ul>
<p>y</p>
carve
![a](i)
^ cap
:::
html
<figure>
  <img src="i" alt="a">
  <figcaption>cap</figcaption>
</figure>
<div>

</div>

A run that closes nothing is an opener even where it was plainly meant as a closer: exact width is a parse rule, and a mismatch opens a nested container rather than turning into text (PART 9 §12).

carve
:::: d
text
:::
html
<div class="d">
  <p>text</p>
  <div>

  </div>
</div>

An invalid opener above changes nothing: it is text and leaves no state (carve#4863).

carve
::: {.x}
not a div
:::
html
<p>::: {.x}
not a div</p>
<div>

</div>

A closer does not rescue a marker-line colon opener whose body folded in ​

10 conformance fixtures

A ::: on a list item's marker line opens its container whatever follows (Only lazy folding demotes a marker-line colon opener, ruled on markup-carve/carve#2978). A line below the item's content column is not its body, and the empty container holds no paragraph, so the line leaves the list and opens a document paragraph. A bare ::: written after it closes nothing that is open, so it is an opener: it interrupts that paragraph (§10 I1), indented or not (PART 0 S3), and opens an empty div. The section keeps the title of the reading it used to pin (markup-carve/carve#2147).

carve
- :::
 y
  :::
html
<ul>
  <li>
    <div>

    </div>
  </li>
</ul>
<p>y</p>
<div>

</div>
carve
- ::: note
 y
  :::
html
<ul>
  <li>
    <aside class="admonition note" aria-label="Note">

    </aside>
  </li>
</ul>
<p>y</p>
<div>

</div>

The same holds for an ordered item, for several lines and after a blank line. In a nested item the line below the inner column still reaches the outer item, which takes it as text, and the run opens its div in the outer item.

carve
1. ::: d
 y
   :::
html
<ol>
  <li>
    <div class="d">

    </div>
  </li>
</ol>
<p>y</p>
<div>

</div>
carve
- ::: d
 y
 z
  :::
html
<ul>
  <li>
    <div class="d">

    </div>
  </li>
</ul>
<p>y
z</p>
<div>

</div>
carve
- ::: d
 y

  :::
html
<ul>
  <li>
    <div class="d">

    </div>
  </li>
</ul>
<p>y</p>
<div>

</div>
carve
- x
  - ::: d
   y
    :::
html
<ul>
  <li>x
    <ul>
      <li>
        <div class="d">

        </div>
      </li>
    </ul>
    y
    <div>

    </div>
  </li>
</ul>

CONTROL. An opener that acquires body at the column still opens, with or without lines folded in after it; one written later in the item, or on a quote's line, is not a marker-line opener and keeps its container.

carve
- ::: d
  :::
html
<ul>
  <li>
    <div class="d">

    </div>
  </li>
</ul>
carve
- ::: d
  x
 y
  :::
html
<ul>
  <li>
    <div class="d">
      <p>x
y</p>
    </div>
  </li>
</ul>
carve
- a
  ::: d
 y
  :::
html
<ul>
  <li>a
    <div class="d">

    </div>
  </li>
</ul>
<p>y</p>
<div>

</div>
carve
> ::: d
y
> :::
html
<blockquote>
  <div class="d">

  </div>
</blockquote>
<p>y</p>
<blockquote>
  <div>

  </div>
</blockquote>

A fenced block quote is the block quote written another way ​

5 conformance fixtures

A colon fence whose type token is a bare > opens a block quote (PART 3, quote_block). It is a second SPELLING, not a second block: the body is ordinary block content and the node is the one the >-prefixed form produces, so the tree is the same one and every rule that speaks of a block quote reaches both. Third member of the sigil-fence family beside ::: | and the hard-break fence, taking the same required space before its token.

carve
::: >
Notes:

- ship the parser
- then the renderer
:::
html
<blockquote>
  <p>Notes:</p>
  <ul>
    <li>ship the parser</li>
    <li>then the renderer</li>
  </ul>
</blockquote>

The fence nests in itself at CONSTANT width, because a typed opener is never bare and only a bare equal-length line closes. Re-quoting is therefore prepend-and-append: nothing already inside is renumbered.

carve
::: >
Carol
::: >
Bob
:::
:::
html
<blockquote>
  <p>Carol</p>
  <blockquote><p>Bob</p></blockquote>
</blockquote>

The separator is a SPACE, as it is for every other colon-fence opener, so a glued marker opens nothing and the line is paragraph text. The bare ::: below it opens a div of its own (carve#4863).

carve
:::>
x
:::
html
<p>:::&gt;
x</p>
<div>

</div>

The ^ caption line attaches to the CLOSING FENCE, and a captioned quote is a <figure> in EITHER spelling: section 4 reads the node, and the two spellings are one node. Without this the fenced form would be a worse block quote than the prefixed one for no reason anybody chose - a ^ line after any other ::: closer is ordinary paragraph text, so an attribution that attaches to > would silently not attach here. Two container kinds take a closer caption now, this one and the composite figure group.

carve
::: >
Stay hungry, stay foolish.
:::
^ Steve Jobs
html
<figure>
  <blockquote><p>Stay hungry, stay foolish.</p></blockquote>
  <figcaption>Steve Jobs</figcaption>
</figure>

The canonical writer writes each quote back in the SPELLING IT WAS READ IN, so a fenced quote holding nothing but a paragraph stays fenced rather than collapsing to the prefixed form. That is what the fenced field on the node is for (resources/ast-schema.json): the two spellings are one node, the field records which one, and without it the writer would have to infer a spelling from the body and would re-canonicalize every document that chose the other. The .fmt sidecars beside these cases pin the bytes.

carve
::: >
hello
:::
html
<blockquote><p>hello</p></blockquote>

An unterminated comment fence in a list item is the line form ​

10 conformance fixtures

Since markup-carve/carve#4907 a %%% opener opens its span with no closer lookahead: without a closer it hides everything up to a line that misses its owner or the end of its container (PART 9 §28). The rows below follow that reading; where the prose describes a closerless opener as a %% line or a closer ahead as deciding the span, it records the reading the ruling replaced.

PART 0's layout automaton classifies comments before block ownership (markup-carve/carve#1731): "An opener without an exact-width closer is one %% line comment; later lines are classified normally." PART 9 §28 states the same rule from the construct side - an opener with no matching closer ahead "does NOT open a block. The line degrades to a comment_line."

So at one column the two spellings cannot answer differently, and PART 9 §24 C3 is why that matters inside an item: its comment exception names both spellings in one breath. The corpus pinned the substitution at the TOP LEVEL and pinned a TERMINATED fence at an item's content column, and nothing in the band between - which is the whole band where a reader can give the degraded fence a third answer and stay green (markup-carve/carve#1909).

The reported document. - x hands out at column 2, the fence is written there and never closed, so it is one line comment: it ends the paragraph under it, the column-0 follower leaves the item, and y is a document paragraph.

carve
- x
  %%%
y
html
<ul>
  <li>x</li>
</ul>
<p>y</p>

The %% line form at the same column with the same follower, which is the answer the substitution requires the row above to have.

carve
- x
  %% z
y
html
<ul>
  <li>x
y</li>
</ul>

And the same fence with a closer, so all three spellings at that column answer alike and the degradation is not what moves the follower.

carve
- x
  %%%
  %%%
y
html
<ul>
  <li>x</li>
</ul>
<p>y</p>

A degraded fence does not CLOSE the item, which is §24 C3's other half. A follower at the content column is still the item's own text.

carve
- x
  %%%
  y
html
<ul>
  <li>x</li>
</ul>

The band starts at the content column and does not end there. Past it the fence is still one line comment.

carve
- x
    %%%
y
html
<ul>
  <li>x</li>
</ul>
<p>y</p>

The band MOVES with the content column rather than sitting at 2. An ordered marker hands out at column 3.

carve
1. x
   %%%
y
html
<ol>
  <li>x</li>
</ol>
<p>y</p>

A padded marker hands out at column 4.

carve
-   x
    %%%
y
html
<ul>
  <li>x</li>
</ul>
<p>y</p>

The closer is searched for in the block the opener would have owned, so a run written after the item has ended closes nothing. The column-0 y leaves the item, the opener above it degrades, and BOTH followers are published rather than one of them hidden as comment body.

carve
- x
  %%%
y
  %%%
z
html
<ul>
  <li>x</li>
</ul>
<p>y</p>

§28 matches a closer on EXACT length, so a wider run below the opener is not one. Both lines degrade and z is published.

carve
- x
  %%%
  %%%%
z
html
<ul>
  <li>x</li>
</ul>
<p>z</p>

The other direction: a fence that IS closed at that column still hides its body. A reader that degraded every fence rather than only the unterminated one would publish body here.

carve
- x
  %%%
  body
  %%%
y
html
<ul>
  <li>x</li>
</ul>
<p>y</p>

A degraded comment fence at a container's column 0 keeps the follower in the item ​

11 conformance fixtures

Since markup-carve/carve#4907 a %%% opener opens its span with no closer lookahead: without a closer it hides everything up to a line that misses its owner or the end of its container (PART 9 §28). The rows below follow that reading; where the prose describes a closerless opener as a %% line or a closer ahead as deciding the span, it records the reading the ruling replaced.

PART 9 §28 says an opener with no matching closer ahead does not open a block: the line degrades to a comment_line. That is a CLASSIFICATION, and §24 C3's comment exception names both spellings in one breath - a comment "does not close the ITEM either: a following line still belongs to the item rather than parsing at document level". So a degraded fence at a container's own column 0 leaves the frame open exactly as the %% line form does (markup-carve/carve#1903).

Section 443 pins the band at and past the item's CONTENT column. This is the column below it that was left open while the question was undecided.

The reported document. Nothing closes the %%%, so it is one line comment: it ends the paragraph under x and leaves the item open, and y is the item's second paragraph rather than a document one.

carve
- x
%%%
y
html
<ul>
  <li>x</li>
</ul>

The %% line form at the same column, which is the answer the substitution requires the row above to have.

carve
- x
%% z
y
html
<ul>
  <li>x
y</li>
</ul>

A TERMINATED fence at that column is a different line: it is a comment BLOCK written at the document's own opener column, and it ends the item. This is the row a reader that degrades every fence rather than only the unterminated one would break.

carve
- x
%%%
%%%
y
html
<ul>
  <li>x</li>
</ul>
<p>y</p>

The band is not the bullet's. An ordered marker hands out at column 3 and its frame's column 0 is still 0.

carve
1. x
%%%
y
html
<ol>
  <li>x</li>
</ol>

Nor does it move with the CONTENT column: a padded marker puts the content at 4 and the fence is still at the frame's column 0.

carve
-   x
%%%
y
html
<ul>
  <li>x</li>
</ul>

Every container's own column 0, at every depth. Inside a nested item the frame's column 0 is the outer item's content column, and the fence written there is the inner item's degraded comment.

carve
- - x
  %%%
  y
html
<ul>
  <li>
    <ul>
      <li>x</li>
    </ul>
  </li>
</ul>

A wider unterminated run degrades the same way - what matters is that no closer of its own length follows, not how long it is.

carve
- x
%%%%
y
html
<ul>
  <li>x</li>
</ul>

§28 matches a closer on EXACT length, so a wider run below the opener is not one. Both lines are line comments and the follower is still the item's.

carve
- x
%%%
%%%%
y
html
<ul>
  <li>x</li>
</ul>

The closer is looked for AHEAD, not on the next line. A fence closed two lines down opens a real block, hides what it swallowed, and ends the item at the document's own opener column - the row a reader that degrades on "no closer immediately below" would break.

carve
- x
%%%
y
%%%
z
html
<ul>
  <li>x</li>
</ul>
<p>z</p>

The item is not the only frame the degraded fence leaves open. The LIST is open too, so a sibling marker below it is the same list's second item rather than a new list.

carve
- x
%%%
- y
html
<ul>
  <li>x</li>
</ul>

The exception is §24 C3's, so it is about ITEM ownership. A block quote has no such clause: a comment at column 0 below it ends the quote in BOTH spellings, and a fix that read §28's substitution as "a degraded fence never closes anything" would break this row.

carve
> x
%%%
y
html
<blockquote><p>x</p></blockquote>

A degraded comment fence leaves a lazy follower where the line form does ​

9 conformance fixtures

Since markup-carve/carve#4907 a %%% opener opens its span with no closer lookahead: without a closer it hides everything up to a line that misses its owner or the end of its container (PART 9 §28). The rows below follow that reading; where the prose describes a closerless opener as a %% line or a closer ahead as deciding the span, it records the reading the ruling replaced.

§28 says an opener with no exact-width closer ahead opens NO block and becomes a line comment. At or past the content column, both forms close the item's paragraph and retain nothing (CARVE-P0-024, CARVE-P0-005). A following below-column line opens a document paragraph.

Section 443 pins the band where the follower sits at column 0 or at the content column; section 445 pins the container's own column 0. These rows show a below-column line outside the item and a lazy continuation of a paragraph opened at the content column.

The reported document. - x hands out at column 2, the unterminated fence is written there, and y at column 1 is below the column and opens a document paragraph.

carve
- x
  %%%
 y
html
<ul>
  <li>x</li>
</ul>
<p>y</p>

The %% z line form at the same coordinates, which is the answer the substitution requires the row above to have.

carve
- x
  %% z
 y
html
<ul>
  <li>x
y</li>
</ul>

The other lazy shape: a body line inside the item, then a flush-left continuation of the paragraph it opened.

carve
- x
  %%%
  body
y
html
<ul>
  <li>x</li>
</ul>
<p>y</p>

Its line-form control.

carve
- x
  %% z
  body
y
html
<ul>
  <li>x
body
y</li>
</ul>

The band moves with the CONTENT column, not with column 2. An ordered marker hands out at 3, so the fence is at 3 and the below-column follower at 2 opens a document paragraph.

carve
1. x
   %%%
  y
html
<ol>
  <li>x</li>
</ol>
<p>y</p>

A padded marker hands out at 4.

carve
-   x
    %%%
   y
html
<ul>
  <li>x</li>
</ul>
<p>y</p>

Past the content column it is still one line comment, and the follower opens a document paragraph.

carve
- x
    %%%
 y
html
<ul>
  <li>x</li>
</ul>
<p>y</p>

A fence that DOES close is not reached by §28 at all - it is an ordinary comment block. At the content column it ends the paragraph under it and retains nothing, so the below-column follower opens a document paragraph (CARVE-P0-024, CARVE-P0-005).

carve
- x
  %%%
  %%%
 y
html
<ul>
  <li>x</li>
</ul>
<p>y</p>

And the host control. A block quote is reached by its MARKER, so an unmarked line below it is outside the quote whatever it is; both spellings end the quote and publish the follower, and a fix that made a degraded fence keep the follower everywhere would break this row.

carve
> x
  %%%
 y
html
<blockquote><p>x</p></blockquote>

A dropped raw block takes no line in the container that holds it ​

8 conformance fixtures

PART 9 §20 emits a raw block verbatim when its format matches the output format and drops it otherwise. PART 10 §4 keeps a blank-line body slot for a container that renders NOTHING, and otherwise every block element takes one line, so a container holding one visible block and one dropped block has no line left to spend on the dropped one.

Five of the pairs are list items. The raw block sits beside a visible paragraph in the first and alone in the second; the rest put it two levels down, inside a quote, and between two paragraphs. A colon div and a footnote body follow, and in the footnote the backlink joins the paragraph the drop leaves last. The control comes last: =html matches the output format, so its payload is placed at the item's column like any other block (carve#2556).

carve
- a

  ```=latex
  \x
  ```
html
<ul>
  <li><p>a</p></li>
</ul>
carve
- ```=latex
  \x
  ```
html
<ul>
  <li></li>
</ul>
carve
- a

  - b

    ```=latex
    \x
    ```
html
<ul>
  <li><p>a</p>
    <ul>
      <li><p>b</p></li>
    </ul>
  </li>
</ul>
carve
> - a
>
>   ```=latex
>   \x
>   ```
html
<blockquote>
  <ul>
    <li><p>a</p></li>
  </ul>
</blockquote>
carve
- a

  ```=latex
  \x
  ```

  c
html
<ul>
  <li><p>a</p>
    <p>c</p>
  </li>
</ul>
carve
:::
a

```=latex
\x
```
:::
html
<div>
  <p>a</p>
</div>
carve
x[^1]

[^1]: a

    ```=latex
    \x
    ```
html
<p>x<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>a<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
- a

  ```=html
  <x>
  ```
html
<ul>
  <li><p>a</p>
    <x>
  </li>
</ul>

A footnote body whose every block renders nothing is an empty body ​

6 conformance fixtures

An endnote item holds the body's block elements, one line each per PART 10 §4, and then the synthesized backlink paragraph. PART 9 §16 reads those lines off what the blocks RENDER, so a comment, a comment fence and a raw block whose format the target does not match each leave the body empty: the <li> opens directly on the backlink paragraph, with no line held for content nobody sees. Mixing them changes nothing, because none of them reaches the output.

carve
a[^1]

[^1]: %% n
html
<p>a<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
a[^1]

[^1]: %%%
  n
  %%%
html
<p>a<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
a[^1]

[^1]: ```=latex
  \x
  ```
html
<p>a<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
a[^1]

[^1]: %% n

  ```=latex
  \x
  ```
html
<p>a<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A body holding one visible block beside an invisible one is not empty, and the visible block keeps its own line above the backlink.

carve
a[^1]

[^1]: > q

  ```=latex
  \x
  ```
html
<p>a<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <blockquote><p>q</p></blockquote>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

The control is =html, the one format the HTML target matches. That block renders, so it takes a line of its own.

carve
a[^1]

[^1]: ```=html
  <b>x</b>
  ```
html
<p>a<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <b>x</b>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A container label publishes its inline run ​

11 conformance fixtures

CARVE-P9-041 enumerates a div label among the hosts that begin an inline run mid-line, and the semantic constraint on label in PART 2 says the slot "holds an inline run (PART 9 §12)". A host with an inline run renders the constructs written in it, so emphasis, strong and a code span in a container label reach the output as elements rather than as the characters the author typed (carve#2572). Both opener spellings answer alike, the bare :::[...] and the named ::: note [...].

Every earlier row that renders a label carries plain text, which is why the engine gates stayed silent on this. The plain-text document in each spelling sits here as the control that must not move.

A code fence carries the one label production and the same balanced close (carve#2576), but the HTML target consumes no fence label, so markup in it reaches no output. What is observable there is the close: a ] inside a code span is content, so the slot runs past it and the fence keeps its payload instead of losing it to an inline code span.

Three shapes stay unpinned. A footnote reference and an abbreviation render in the oracle and in no engine; a reference in a label resolves in none of the four. All three need the label's run to reach the AST, which no clause settles.

carve
:::[/i/]
body
:::
html
<div>
  <p class="div-label"><em>i</em></p>
  <p>body</p>
</div>
carve
:::[*b*]
body
:::
html
<div>
  <p class="div-label"><strong>b</strong></p>
  <p>body</p>
</div>
carve
:::[`x`]
body
:::
html
<div>
  <p class="div-label"><code>x</code></p>
  <p>body</p>
</div>
carve
:::[plain]
body
:::
html
<div>
  <p class="div-label">plain</p>
  <p>body</p>
</div>
carve
::: note [/i/]
body
:::
html
<aside class="admonition note" aria-label="Note">
  <p class="div-label"><em>i</em></p>
  <p>body</p>
</aside>
carve
::: note [`x`]
body
:::
html
<aside class="admonition note" aria-label="Note">
  <p class="div-label"><code>x</code></p>
  <p>body</p>
</aside>
carve
::: note [plain]
body
:::
html
<aside class="admonition note" aria-label="Note">
  <p class="div-label">plain</p>
  <p>body</p>
</aside>
carve
``` js [a `]` b]
c
```
html
<pre><code class="language-js">c
</code></pre>
carve
``` js [/i/]
c
```
html
<pre><code class="language-js">c
</code></pre>
carve
``` js [plain]
c
```
html
<pre><code class="language-js">c
</code></pre>

A code span inside the label keeps its ], so the label runs to the bracket after it:

carve
:::[a `]` b]
body
:::
html
<div>
  <p class="div-label">a <code>]</code> b</p>
  <p>body</p>
</div>

A container label preserves closed inline constructs before cutting a comment ​

5 conformance fixtures

A container label is an inline run under CARVE-P9-041. A trailing comment inside a closed insertion or deletion ends at that construct’s closer. Delimited comments, critic comments and verbatim spans keep their own boundaries before the label’s trailing comment is considered.

carve
:::[{+a %% secret+}]
body
:::
html
<div>
  <p class="div-label"><ins>a</ins></p>
  <p>body</p>
</div>
carve
:::[{-a %% secret-}]
body
:::
html
<div>
  <p class="div-label"><del>a</del></p>
  <p>body</p>
</div>
carve
:::[{% %% hidden %} after]
body
:::
html
<div>
  <p class="div-label"> after</p>
  <p>body</p>
</div>
carve
:::[{# %% hidden #} after]
body
:::
html
<div>
  <p class="div-label"><span class="critic-comment"> %% hidden </span> after</p>
  <p>body</p>
</div>
carve
:::[`a %% secret`]
body
:::
html
<div>
  <p class="div-label"><code>a %% secret</code></p>
  <p>body</p>
</div>

A braced span cannot close beyond its bracket run ​

13 conformance fixtures

A forced span or an editorial insertion, deletion or substitution opened inside a bracket run cannot pair with a closer outside that run (PART 8 parsing precedence). Both delimiters remain literal. Complete spans inside a run still parse. Editorial comments are opaque to bracket scanning, so a bracket inside a comment opens no run; the final controls pin those cases.

carve
[{^a]^}
html
<p>[{^a]^}</p>
carve
[{,a],}
html
<p>[{,a],}</p>
carve
[{*a]*}
html
<p>[{*a]*}</p>
carve
[{/a]/}
html
<p>[{/a]/}</p>
carve
[{+a]+}
html
<p>[{+a]+}</p>
carve
[{-a]-}
html
<p>[{-a]-}</p>
carve
[{~a]~}
html
<p>[{~a]~}</p>
carve
[{_a]_}
html
<p>[{_a]_}</p>
carve
[{=a]=}
html
<p>[{=a]=}</p>
carve
[{~a ~> b]~}
html
<p>[{~a ~&gt; b]~}</p>
carve
[{#a]#}
html
<p>[<span class="critic-comment">a]</span></p>
carve
[{+a+}]
html
<p>[<ins>a</ins>]</p>
carve
[{^a^}]
html
<p>[<sup>a</sup>]</p>

Quoted values and titles retain a non-punctuation backslash ​

12 conformance fixtures

Quoted attributes and link titles resolve ASCII punctuation escapes. A backslash before a letter remains content; titles alone admit a newline (carve#2587).

carve
[a](/u "t\zu")
html
<p><a href="/u" title="t\zu">a</a></p>
carve
[a]{k="t\zu"}
html
<p><span k="t\zu">a</span></p>
carve
[a](/u "t\}u")
html
<p><a href="/u" title="t}u">a</a></p>
carve
[a]{k="t\}u"}
html
<p><span k="t}u">a</span></p>
carve
[a](/u "t\\u")
html
<p><a href="/u" title="t\u">a</a></p>
carve
[a]{k="t\\u"}
html
<p><span k="t\u">a</span></p>
carve
[a](/u 't\zu')
html
<p><a href="/u" title="t\zu">a</a></p>
carve
[a]{k='t\zu'}
html
<p><span k="t\zu">a</span></p>
carve
[a](/u 't\}u')
html
<p><a href="/u" title="t}u">a</a></p>
carve
[a]{k='t\}u'}
html
<p><span k="t}u">a</span></p>
carve
[a](/u 't\\u')
html
<p><a href="/u" title="t\u">a</a></p>
carve
[a]{k='t\\u'}
html
<p><span k="t\u">a</span></p>

A marker-line opaque quote keeps overindented markers literal ​

36 conformance fixtures

Code and raw fences opened on the marker line preserve overindented quote markers as item text while their tail remains fenced. Aligned markers, blank separators, later fence openers and other quote heads are controls.

carve
- > ```
  > x
  > y
  > ```
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
y
</code></pre>
    </blockquote>
  </li>
</ul>
carve
- > ```
  > x
    > y
  > ```
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
y
</code></pre>
    </blockquote>
  </li>
</ul>
carve
- > ```
  > x

  > y
  > ```
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
    </blockquote>
    <blockquote>
      <p>y</p>
      <pre><code></code></pre>
    </blockquote>
  </li>
</ul>
carve
- > ```
  > x

    > y
  > ```
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
    </blockquote>
    <blockquote>
      <p>y</p>
      <pre><code></code></pre>
    </blockquote>
  </li>
</ul>
carve
- > ```
  > x
  > ```
  > y
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > ```
  > x
  > ```
    > y
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > ```
  > x
  > ```

  > y
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
    </blockquote>
    <blockquote><p>y</p></blockquote>
  </li>
</ul>
carve
- > ```
  > x
  > ```

    > y
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
    </blockquote>
    <blockquote><p>y</p></blockquote>
  </li>
</ul>
carve
- > ~~~
  > x
  > y
  > ~~~
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
y
</code></pre>
    </blockquote>
  </li>
</ul>
carve
- > ~~~
  > x
    > y
  > ~~~
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
y
</code></pre>
    </blockquote>
  </li>
</ul>
carve
- > ~~~
  > x

  > y
  > ~~~
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
    </blockquote>
    <blockquote>
      <p>y</p>
      <pre><code></code></pre>
    </blockquote>
  </li>
</ul>
carve
- > ~~~
  > x

    > y
  > ~~~
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
    </blockquote>
    <blockquote>
      <p>y</p>
      <pre><code></code></pre>
    </blockquote>
  </li>
</ul>
carve
- > ~~~
  > x
  > ~~~
  > y
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > ~~~
  > x
  > ~~~
    > y
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > ~~~
  > x
  > ~~~

  > y
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
    </blockquote>
    <blockquote><p>y</p></blockquote>
  </li>
</ul>
carve
- > ~~~
  > x
  > ~~~

    > y
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
    </blockquote>
    <blockquote><p>y</p></blockquote>
  </li>
</ul>
carve
- > ```=html
  > x
  > y
  > ```
html
<ul>
  <li>
    <blockquote>
      x
y
    </blockquote>
  </li>
</ul>
carve
- > ```=html
  > x
    > y
  > ```
html
<ul>
  <li>
    <blockquote>
      x
y
    </blockquote>
  </li>
</ul>
carve
- > ```=html
  > x

  > y
  > ```
html
<ul>
  <li>
    <blockquote>
      x
    </blockquote>
    <blockquote>
      <p>y</p>
      <pre><code></code></pre>
    </blockquote>
  </li>
</ul>
carve
- > ```=html
  > x

    > y
  > ```
html
<ul>
  <li>
    <blockquote>
      x
    </blockquote>
    <blockquote>
      <p>y</p>
      <pre><code></code></pre>
    </blockquote>
  </li>
</ul>
carve
- > ```=html
  > x
  > ```
  > y
html
<ul>
  <li>
    <blockquote>
      x
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > ```=html
  > x
  > ```
    > y
html
<ul>
  <li>
    <blockquote>
      x
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > ```=html
  > x
  > ```

  > y
html
<ul>
  <li>
    <blockquote>
      x
    </blockquote>
    <blockquote><p>y</p></blockquote>
  </li>
</ul>
carve
- > ```=html
  > x
  > ```

    > y
html
<ul>
  <li>
    <blockquote>
      x
    </blockquote>
    <blockquote><p>y</p></blockquote>
  </li>
</ul>
carve
- > # H
  > y
html
<ul>
  <li>
    <blockquote>
      <h1 id="H">H</h1>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > # H
    > y
html
<ul>
  <li>
    <blockquote>
      <h1 id="H">H</h1>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > | a |
  > y
html
<ul>
  <li>
    <blockquote>
      <table>
        <tbody>
          <tr><td>a</td></tr>
        </tbody>
      </table>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > | a |
    > y
html
<ul>
  <li>
    <blockquote>
      <table>
        <tbody>
          <tr><td>a</td></tr>
        </tbody>
      </table>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > p
  > ```
  > x
  > ```
    > y
html
<ul>
  <li>
    <blockquote>
      <p>p</p>
      <pre><code>x
</code></pre>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > p
  >
  > ```
  > x
  > ```
    > y
html
<ul>
  <li>
    <blockquote>
      <p>p</p>
      <pre><code>x
</code></pre>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > > ```
  > > x
  > > ```
    > y
html
<ul>
  <li>
    <blockquote>
      <blockquote>
        <pre><code>x
</code></pre>
      </blockquote>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > > ```
  > > x
    > y
html
<ul>
  <li>
    <blockquote>
      <blockquote>
        <pre><code>x
</code></pre>
      </blockquote>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > ***
    > y
html
<ul>
  <li>
    <blockquote>
      <hr>
      <p>y</p>
    </blockquote>
  </li>
</ul>
carve
- > %%%
  > x
    > y
  > %%%
html
<ul>
  <li>
    <blockquote>

    </blockquote>
  </li>
</ul>
carve
- > ```
  > x
  > ```
  > ~~~
  > z
    > y
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
      <pre><code>z
y
</code></pre>
    </blockquote>
  </li>
</ul>
carve
- > ```
  > x
  > ```
  > ~~~
  > z
  > ~~~
    > y
html
<ul>
  <li>
    <blockquote>
      <pre><code>x
</code></pre>
      <pre><code>z
</code></pre>
      <p>y</p>
    </blockquote>
  </li>
</ul>

An indented quoted item keeps a lazy line at its base ​

1 conformance fixture

A list item indented one column opens a quote. The next line, at the item's base column, is a lazy continuation of the quote's paragraph.

carve
 - > a
 b
html
<ul>
  <li>
    <blockquote><p>a
b</p></blockquote>
  </li>
</ul>

A blank ends the old quote's child column ​

1 conformance fixture

A new quote after the blank does not inherit the list item from the earlier quote. The indented definition stays prose and the reference stays unresolved.

carve
> - x

>   [r]: /u

> [r][]
html
<blockquote>
  <ul>
    <li>x</li>
  </ul>
</blockquote>
<blockquote>

</blockquote>
<blockquote><p><a href="/u">r</a></p></blockquote>

An unclosed nested fence keeps blanks before outer text ​

1 conformance fixture
carve
- - ```


  tail
html
<ul>
  <li>
    <ul>
      <li>
        <pre><code>

</code></pre>
      </li>
    </ul>
    <p>tail</p>
  </li>
</ul>

A second plus starts its own paragraph after attachment ​

4 conformance fixtures
carve
> q
+
+
html
<blockquote><p>q</p></blockquote>
carve
- q
+
+

- r
html
<ul>
  <li><p>q</p></li>
  <li><p>r</p></li>
</ul>
carve
:: t
: q
+
+
html
<dl>
  <dt>t</dt>
  <dd>q</dd>
</dl>
carve
[^a]: q
+
+

ref [^a]
html
<p>ref <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>q<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

Compact single-paragraph quote ​

1 conformance fixture
carve
> q
html
<blockquote><p>q</p></blockquote>

Consecutive continuation markers in a div-hosted quote ​

1 conformance fixture
carve
::: note
> q
+
+
:::
html
<aside class="admonition note" aria-label="Note">
  <blockquote><p>q</p></blockquote>
</aside>

A refused first-block plus folds its content-column line, and the next root block ends the item ​

4 conformance fixtures

A line at the content column refuses - + and folds into the + (carve#4409). The next root block begins after the item.

carve
- +
  x
>
html
<ul>
  <li>x</li>
</ul>
<blockquote>

</blockquote>
carve
- +
  x
# h
html
<ul>
  <li>x</li>
</ul>
<section id="h">
  <h1>h</h1>
</section>
carve
- +
  x
---
html
<ul>
  <li>x</li>
</ul>
<hr>
carve
- +
	x
>
html
<ul>
  <li>x</li>
</ul>
<blockquote>

</blockquote>

A nested item whose plus is refused releases the next root block ​

5 conformance fixtures

A line at the inner item's content column refuses the + and folds into it (carve#4409). The next block begins at the document root.

carve
- - +
    x
> tail
html
<ul>
  <li>
    <ul>
      <li>x</li>
    </ul>
  </li>
</ul>
<blockquote><p>tail</p></blockquote>
carve
- - +
    x
# tail
html
<ul>
  <li>
    <ul>
      <li>x</li>
    </ul>
  </li>
</ul>
<section id="tail">
  <h1>tail</h1>
</section>
carve
- - +
    x
---
html
<ul>
  <li>
    <ul>
      <li>x</li>
    </ul>
  </li>
</ul>
<hr>
carve
- - +
    x
::: note
tail
:::
html
<ul>
  <li>
    <ul>
      <li>x</li>
    </ul>
  </li>
</ul>
<aside class="admonition note" aria-label="Note">
  <p>tail</p>
</aside>
carve
- - +
    x
:: tail
:  definition
html
<ul>
  <li>
    <ul>
      <li>x</li>
    </ul>
  </li>
</ul>
<dl>
  <dt>tail</dt>
  <dd>definition</dd>
</dl>

An enclosing closer ends a tag name ​

1 conformance fixture

The deletion closer takes its hyphen before the tag name can consume it. A bare tag keeps the same trailing hyphen because no frame is waiting to close.

carve
{-{#x-}

#x-
html
<p><del>{<span class="tag"><strong>#x</strong></span></del></p>
<p><span class="tag"><strong>#x-</strong></span></p>

A contentless description marker folds under a quoted term ​

1 conformance fixture
carve
> :: t
:
html
<blockquote>
  <dl>
    <dt>t</dt>
  </dl>
</blockquote>
<p>:</p>

An overindented colon opener ends the quote paragraph ​

1 conformance fixture
carve
>  ::: |
x
html
<blockquote>
  <div class="line-block">

  </div>
</blockquote>
<p>x</p>

A first-block plus hands its block to the host as the host reads it ​

16 conformance fixtures

A first-block + attaches one block (PART 9 SS17 L3, L4), and the host reads that block like any other body line. A lazy line under a note's first block is paragraph text in the note. A code fence the attached block leaves open runs to the end of the host and takes no extra empty payload line from the attachment.

carve
[^a]: +
tail
 flush

see[^a]
html
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>tail
flush<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
[^a]: +
tail
flush

see[^a]
html
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>tail
flush<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
> [^a]: +
> tail
>  flush

see[^a]
html
<blockquote>

</blockquote>
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>tail
flush<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
[^a]: +
~s~
 flush

see[^a]
html
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p><s>s</s>
flush<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
- +
  ```
  x
html
<ul>
  <li>
    <pre><code>x
</code></pre>
  </li>
</ul>
carve
- foo
  - +
    ```
    x
    ``
html
<ul>
  <li>foo
    <ul>
      <li>
        <pre><code>x
``
</code></pre>
      </li>
    </ul>
  </li>
</ul>
carve
- a
  - ```
 +
````
html
<ul>
  <li>a
    <ul>
      <li>
        <pre><code></code></pre>
      </li>
    </ul>
  </li>
</ul>
<p>+</p>
<pre><code></code></pre>
carve
[^a]: +
```
x

see[^a]
html
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <pre><code>x
</code></pre>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
- +
  ```
  x
  ```
  para
html
<ul>
  <li>
    <pre><code>x
</code></pre>
    para
  </li>
</ul>
carve
- +
  ```
  x
- b
html
<ul>
  <li>
    <pre><code>x
</code></pre>
  </li>
  <li>b</li>
</ul>
carve
- a
  - b
  +
  {.x}
  ```
 code
  ```
html
<ul>
  <li>a
    <ul>
      <li>b
        <pre class="x"><code></code></pre>
      </li>
    </ul>
  </li>
</ul>
<p>code</p>
<pre><code></code></pre>
carve
- +
  {.x}
  ```
  x
html
<ul>
  <li>
    <pre class="x"><code>x
</code></pre>
  </li>
</ul>
carve
[^a]: +
{.x}
```
x

see[^a]
html
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <pre class="x"><code>x
</code></pre>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
- a
  - b
  +
  ```
    code
  ```
html
<ul>
  <li>a
    <ul>
      <li>b
        <pre><code>  code
</code></pre>
      </li>
    </ul>
  </li>
</ul>
carve
- a
  - b
    - c
    +
    ```
      code
    ```
html
<ul>
  <li>a
    <ul>
      <li>b
        <ul>
          <li>c
            <pre><code>  code
</code></pre>
          </li>
        </ul>
      </li>
    </ul>
  </li>
</ul>
carve
> - a
>   - b
>   +
>   ```
>     code
>   ```
html
<blockquote>
  <ul>
    <li>a
      <ul>
        <li>b
          <pre><code>  code
</code></pre>
        </li>
      </ul>
    </li>
  </ul>
</blockquote>

A description a plus filled stays open for a sibling ​

4 conformance fixtures

A + decides where its block attaches and nothing else, so a : line below the body column opens the next description at any column, after a paragraph or any other block (carve#4408).

A paragraph the + attached

carve
:: t
: +
l
 : b
html
<dl>
  <dt>t</dt>
  <dd>l</dd>
  <dd>b</dd>
</dl>

A heading the + attached

carve
:: t
: +
# H
 : b
html
<dl>
  <dt>t</dt>
  <dd>
    <h1 id="H">H</h1>
  </dd>
  <dd>b</dd>
</dl>

A + past its term refuses a follower at column zero, and the sibling still opens

carve
:: t
 : +
l
 : b
html
<dl>
  <dt>t</dt>
  <dd></dd>
</dl>
<p>l
: b</p>

Through a quote's prefix

carve
> :: t
> : +
> # H
>  : b
html
<blockquote>
  <dl>
    <dt>t</dt>
    <dd>
      <h1 id="H">H</h1>
    </dd>
    <dd>b</dd>
  </dl>
</blockquote>

A lone plus in a fenced quote is text ​

1 conformance fixture

PART 2 and PART 9 §17 L5 (carve#4544). A ::: > quote is the same block quote as the > spelling, but its body is a fenced container's, so a lone + in it is text and not a continuation marker.

carve
::: >
+
# H
:::
html
<blockquote>
  <p>+</p>
  <h1 id="H">H</h1>
</blockquote>

A code fence with invalid metadata keeps its language ​

8 conformance fixtures

A backtick or tilde fence whose language token is followed by metadata that is not an optional "header" then an optional [label] recovers the way a colon fence does (carve#4807): when the token ends at whitespace, a straight or curly double quote, { or [, the line opens a code block with that language, drops all opener metadata and reports fence-title-syntax.

The reproduction from carve#4807. The opener's language token ends at a space, so the code block keeps js and drops {1,3}. The later fences pair as before instead of inverting prose and code:

carve
```js {1,3}
a
```

text *x*

```py
b
```

after
html
<pre><code class="language-js">a
</code></pre>
<p>text <strong>x</strong></p>
<pre><code class="language-py">b
</code></pre>
<p>after</p>

A tilde fence recovers the same way:

carve
~~~py {.x}
b
~~~
html
<pre><code class="language-py">b
</code></pre>

The language token may end at {, [ or a quote with no space before it:

carve
```js{1,3}
a
```
html
<pre><code class="language-js">a
</code></pre>

All metadata is dropped, a valid header included:

carve
```js "T" junk
a
```
html
<pre><code class="language-js">a
</code></pre>

A recovered opener is an opener, so it interrupts an open paragraph:

carve
para
```js title="x"
a
```
html
<p>para</p>
<pre><code class="language-js">a
</code></pre>

A later run of the opener's character at least as long as the opener keeps the inline code span reading, so this line stays a paragraph:

carve
```js foo``` is inline
html
<p><code>js foo</code> is inline</p>

Without a language token there is nothing to recover, and the line falls back to paragraph text:

carve
``` {.x}
a
```
html
<p><code> {.x}
a</code></p>
<pre><code></code></pre>

A language token that ends at any other character is not recovered either:

carve
```js, foo
a
```
html
<p><code>js, foo
a</code></p>
<pre><code></code></pre>

A quoted comment span uses its live owner ​

1 conformance fixture

PART 0 S1 (CARVE-P0-005). A line that misses a span's item ends that span. The later unmarked delimiter opens a new span in the document and keeps all following lines as payload.

carve
> - %%%%
> x
%%%%

z
html
<blockquote>
  <ul>
    <li></li>
  </ul>
  <p>x</p>
</blockquote>

An unmarked comment-shaped line is payload while a quote-owned span remains open. Its exact closer ends that span, leaving one quote. The decision trace pins this case in the direct regression test.

carve
> %%%
%%
> %%%
z
html
<blockquote>

</blockquote>
<p>z</p>

An own line plus fence keeps a quote blank ​

1 conformance fixture

A quote's own-line + fence keeps the blank and later prefixed payload, as every host does (PART 0 S1, carve#5560 and carve#5635).

carve
> p
+
```
a

> zq
html
<blockquote>
  <p>p</p>
  <pre><code>a

zq
</code></pre>
</blockquote>

A quote-attached colon keeps a later plus ​

1 conformance fixture

An unclosed colon body attached by a marker-line + keeps a later + at the quote's marker column as paragraph text (PART 0 P1 and P8, PART 9 §17 L5, carve#5658 ruling A).

carve
> +
::: note
x
+
zq
html
<blockquote>
  <aside class="admonition note" aria-label="Note">
    <p>x
+
zq</p>
  </aside>
</blockquote>

An own-line item fence ends in a note ​

1 conformance fixture

A line that misses the item ends its own-line attachment even when a later shifted run resembles a closer (PART 0 S1 step 2, carve#5658 F06 ruling).

carve
::: note
- x
+
```

b
  ```
:::
html
<aside class="admonition note" aria-label="Note">
  <ul>
    <li>x
      <pre><code>
</code></pre>
    </li>
  </ul>
  <p>b</p>
  <pre><code></code></pre>
</aside>

Released under the MIT License.