Skip to content

Footnotes ​

Bodies as blocks, the body content column, collection inside containers and placement of the rendered list.

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

Footnote with multiple blocks ​

2 conformance fixtures

A footnote definition's body is parsed as full block content — multiple paragraphs (or lists, etc.) indented under the definition. The backlink is appended to the last block.

carve
See the note.[^n]

[^n]: First paragraph of the note.

    Second paragraph, indented under the definition.
html
<p>See the note.<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>First paragraph of the note.</p>
      <p>Second paragraph, indented under the definition.<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

The continuation marker + also works here: a lone + attaches the following flush-left block to the note, so a second block needs no indentation.

carve
See the note.[^n]

[^n]: First paragraph of the note.
+
A second paragraph, joined with +.
html
<p>See the note.<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>First paragraph of the note.</p>
      <p>A second paragraph, joined with +.<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A fence after a footnote quote has its own base ​

8 conformance fixtures

PART 0 [CARVE-P0-004] gives a recognized opener past the footnote body's minimum column its own authored base. Under PART 2 [CARVE-P2-008], an unmarked blank ends the preceding quote, so the code or raw fence opens a sibling block in the footnote. PART 2 [CARVE-P2-006] measures its closer from that fence's base. The paragraph controls use column 3 (carve#2598).

carve
x[^1]

[^1]: > q

  ```js
  c
  ```
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">
      <blockquote><p>q</p></blockquote>
      <pre><code class="language-js">c
</code></pre>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
x[^1]

[^1]: > q

   ```js
   c
   ```
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">
      <blockquote><p>q</p></blockquote>
      <pre><code class="language-js">c
</code></pre>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
x[^1]

[^1]: > q

        ```js
        c
        ```
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">
      <blockquote><p>q</p></blockquote>
      <pre><code class="language-js">c
</code></pre>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
x[^1]

[^1]: > q

  ```=latex
  c
  ```

  after
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">
      <blockquote><p>q</p></blockquote>
      <p>after<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
x[^1]

[^1]: > q

   ```=latex
   c
   ```

  after
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">
      <blockquote><p>q</p></blockquote>
      <p>after<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
x[^1]

[^1]: > q

        ```=latex
        c
        ```

  after
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">
      <blockquote><p>q</p></blockquote>
      <p>after<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
x[^1]

[^1]: q

   ```js
   c
   ```
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>q</p>
      <pre><code class="language-js">c
</code></pre>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
x[^1]

[^1]: q

   ```=latex
   c
   ```

  after
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>q</p>
      <p>after<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

Cross-references resolve inside footnote bodies ​

1 conformance fixture

A footnote definition is full block content, so a </#id> cross-reference (and reference links) inside a footnote body resolve against document-level targets.

carve
# H

Body[^n]

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

Footnote definition inside a container is collected ​

2 conformance fixtures

A footnote definition is document-level metadata: it is collected and resolved even when it sits inside a blockquote or a list item (PART 9 §16). The reference resolves to an endnote and the container that held the definition is left empty.

Definition inside a blockquote:

carve
See [^a].

> [^a]: note body
html
<p>See <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a>.</p>
<blockquote>

</blockquote>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>note body<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

Definition inside a list item:

carve
See [^a].

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

Footnotes placement ​

1 conformance fixture

A ::: footnotes block flushes the endnotes section at that point instead of at the document end. All footnotes are included, even those referenced after the marker.

carve
Intro[^a] and[^b].

::: footnotes
:::

## After

More text.

[^a]: first note

[^b]: second note
html
<p>Intro<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> and<a id="fnref2" href="#fn2" role="doc-noteref"><sup>2</sup></a>.</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>first note<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
    <li id="fn2">
      <p>second note<a href="#fnref2" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
<section id="After">
  <h2>After</h2>
  <p>More text.</p>
</section>

A footnotes placement marker inside a container does not place ​

1 conformance fixture

Only a top-level ::: footnotes marker relocates the endnotes section (PART 9 §16, CARVE-P9-073). Inside a block quote the marker renders §12's <div class="footnotes"> floor where it is written, and the section is appended where an unmarked document puts it - after all body content, which a position inside the quote is not.

carve
Intro[^a].

> ::: footnotes
> :::

[^a]: only note
html
<p>Intro<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a>.</p>
<blockquote>
  <div class="footnotes">

  </div>
</blockquote>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>only note<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A footnotes marker renders its authored blocks before the placed section ​

1 conformance fixture

The first top-level marker keeps its authored blocks as siblings immediately before the endnotes section. The generated section still follows at the marker.

carve
Intro[^a].

::: footnotes
Notes below:
:::

After.

[^a]: one note
html
<p>Intro<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a>.</p>
<p>Notes below:</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>one note<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
<p>After.</p>

An unplaced footnotes marker keeps its authored blocks inside the div ​

2 conformance fixtures

A marker with no referenced notes renders the ordinary div. After a first marker places the section, a later marker renders the same div.

carve
Plain.

::: footnotes
No notes here.
:::
html
<p>Plain.</p>
<div class="footnotes">
  <p>No notes here.</p>
</div>
carve
X[^a].

::: footnotes
First marker.
:::

::: footnotes
Second marker.
:::

[^a]: note
html
<p>X<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a>.</p>
<p>First marker.</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>
<div class="footnotes">
  <p>Second marker.</p>
</div>

Footnote definition requires an inline body ​

1 conformance fixture

A footnote definition carries its body on the marker line: [^label]: followed by a space and inline content (PART 9 §16). A bare [^label]: with nothing after the colon is not a definition — it stays an ordinary paragraph, and a following indented line folds into it as paragraph text. Continuation lines extend a definition only when the marker line itself opened one.

carve
Use [^a].

[^a]:
  First
html
<p>Use [^a].</p>
<p>[^a]:
First</p>

Footnote definition separator must be a space ​

1 conformance fixture

The separator after a footnote-definition marker must be a literal space (U+0020). A tab after [^label]: does not open a definition; the line stays an ordinary paragraph and the tab is preserved as text. This aligns with heading, list, and task markers, which already reject a tab, and with the grammar 's space production.

carve
Use [^a].

[^a]:	Tabbed
html
<p>Use [^a].</p>
<p>[^a]:	Tabbed</p>

Unresolved footnote reference with a trailing attribute stays literal ​

3 conformance fixtures

A [^a] footnote reference with no matching definition is not a footnote and does not become an attributed span: it stays literal text, and a following {...} attribute block does not attach to it.

carve
Text[^a]{.ref}.
html
<p>Text[^a].</p>

A resolved footnote reference is unaffected.

carve
Text[^a].

[^a]: note.
html
<p>Text<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>

A genuine bracketed span with attributes still works.

carve
A [span]{.c} here.
html
<p>A <span class="c">span</span> here.</p>

A caret is a reference label, not an empty footnote ​

2 conformance fixtures

footnote_label = {character - ']'}+ is one-or-more, so [^] has no footnote label and [^]: /u is not a footnote definition. `reference_label = (character

  • ']' - '@'), {character - ']'}excludes exactly two characters, and^is not one of them - so the line IS a link reference definition whose label is^, and a reference spelled [text][^]` resolves against it.

Pinned because all three engines and this repository's own oracle once disagreed: the definition vanished in one, became an empty-label footnote in another, and the oracle's label pattern excluded a character the production admits (carve-rs#488, carve-rs#511, carve#589).

carve
[^]: /u

see [text][^].
html
<p>see <a href="/u">text</a>.</p>

A bare [^] with nothing defining it stays literal, since Carve has no shortcut reference.

carve
see [^].
html
<p>see [^].</p>

A definition on a footnote body's continuation line is collected ​

1 conformance fixture

A footnote body is a container like any other, and §16 collects a definition out of a container. On the body's own continuation column the line defines, renders nothing, and the reference below the note resolves. carve-rs rendered it as note text until carve-rs#599; nothing in the corpus held the other two to it.

carve
[^a]: note
  [r]: /u

see[^a] and [t][r]
html
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> and <a href="/u">t</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>

A footnote body holds blocks, and they render where they were written ​

1 conformance fixture

A note body is a container: it holds blocks, not just inline content, and each renders at the body's own indentation. The body here ends in a PARAGRAPH, so the backlink lands in it directly; "A footnote body's last block, when it is not a paragraph, gets a synthesized paragraph for the backlink" (below) pins what happens when the last block is a code block, a block quote, a table, a div or a raw block instead.

carve
[^a]: intro

  | a |
  | - |
  | b |

  closing line.

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>intro</p>
      <table>
        <thead>
          <tr><th scope="col">a</th></tr>
        </thead>
        <tbody>
          <tr><td>b</td></tr>
        </tbody>
      </table>
      <p>closing line.<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A heading in a footnote body takes an id but no section wrapper ​

1 conformance fixture

A heading inside a note is a heading: it gets the generated id every other heading gets, so a fragment link and an implicit reference can reach it. What it does NOT get is the <section> wrapper, which only applies at document level - a note is already inside an <li>.

carve
[^a]: note

  # H

  after

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>
      <h1 id="H">H</h1>
      <p>after<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

An attribute line inside a footnote body attaches inside it ​

1 conformance fixture

A block-attribute line attaches to the block that follows it, wherever it was written. Inside a note body that is the note's own next block, and a dangling one at the end of the body attaches to nothing at all - it does not reach the document below (§15 A4).

carve
[^a]: note

  {.cls}
  styled

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>
      <p class="cls">styled<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A nested list in a footnote body stays nested ​

1 conformance fixture

Relative indentation inside a note body means what it means everywhere else: it says which item a marker belongs to. A body collected flush-left loses that, and the sublist becomes a sibling.

carve
[^a]: note

  - one
    - deep

  end.

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>
      <ul>
        <li>one
          <ul>
            <li>deep</li>
          </ul>
        </li>
      </ul>
      <p>end.<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A flush-left line after a footnote definition belongs to the document ​

1 conformance fixture

A note body is the definition line plus lines indented by at least two spaces (§16). A flush-left line is not one of them: it ends the body and is the document's own next block. The + continuation marker (§17 L4) is the way to attach a flush-left block to a note, and it is deliberate rather than accidental.

carve
a
[^f]: note
b

see[^f]
html
<p>a</p>
<p>b</p>
<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>

A footnote continuation survives a blank run ​

4 conformance fixtures

A footnote definition's body is "the def line plus any following lines indented by at least two columns", and PART 9 §24 C1 measures that floor in columns. What the clause does not say is that a blank RUN between the def line and an indented continuation ends the body - and it does not, because a blank run ends no other indented block in Carve either. A list item, a quote and a container all keep an indented continuation across one, and a footnote definition is an indented container like the others (carve#1620).

Ending the body there is worse than it first looks, because ejecting the continuation RELOCATES it: a note's body renders in the endnotes section at the foot of the document, while the ejected paragraph lands at document level above it. The paragraph moves backwards past unrelated blocks, which is not what "the definition ended here" means.

Two blank lines, then a paragraph continuation - the shape three engines read three ways until this pinned it:

carve
See[^1].

[^1]: a


    b
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>a</p>
      <p>b<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

The same run above a list, so the pin does not rest on the continuation being a paragraph:

carve
See[^1].

[^1]: a


    - b
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>a</p>
      <ul>
        <li>b</li>
      </ul>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

Three blank lines, which is the count PART 9 §11 N1a is about. N1a fires only before a LIST MARKER at the level the run sits in, and the run here is interior to the definition body, so it neither fires nor is disturbed - the length of the run is not what decides this (carve#1430).

carve
See[^1].

[^1]: a



    b
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>a</p>
      <p>b<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

The run's LENGTH is interior to the body too, and it is measured there rather than collapsed on the way in. Three blanks between two sibling markers is §11 N1a's boundary, so the body holds two lists rather than one - the same answer the run would give at the top level, which is the point of not standing one blank in for the whole run.

carve
See[^1].

[^1]: - a



  - b
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">
      <ul>
        <li>a</li>
      </ul>
      <ul>
        <li>b</li>
      </ul>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A footnote body's authored base can open a table past column two ​

1 conformance fixture

The body's minimum column is fixed by §16's space, space, not read off the first continuation line. A recognized block opener at or beyond that minimum establishes its own authored base, so these rows remain a table when written one column farther in. Canonical output returns the table to the body's minimum column.

carve
[^a]: intro

   | a |
   | - |
   | b |

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>intro</p>
      <table>
        <thead>
          <tr><th scope="col">a</th></tr>
        </thead>
        <tbody>
          <tr><td>b</td></tr>
        </tbody>
      </table>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A definition below a footnote body's column is the document's own text ​

1 conformance fixture

One space is not a continuation - §16 wants two - so the line leaves the note and is the document's next block. It is not a definition either: the production starts at the opening bracket and allows no leading indent, so the reference below stays literal. The line is VISIBLE and INERT, and those two halves have to be pinned together: carve-js and carve-php rendered it AND defined from it, so a reader saw the definition as prose while a reference silently resolved through the same line (carve#701, carve-js#681, carve-php#825).

carve
[^a]: note
 [r]: /u

see[^a] and [t][r]
html
<p>[r]: /u</p>
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> and [t][r]</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>

A definition past a footnote body's column registers from its authored base ​

1 conformance fixture

Three spaces is a continuation, so the line belongs to the note. Because a recognized opener may establish an authored base past the minimum column, the link definition registers from there and remains invisible. The one-space control above still leaves the body and stays literal.

carve
[^a]: note
   [r]: /u

see[^a] and [t][r]
html
<p>see<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> and <a href="/u">t</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>

A tab reaches a footnote body's column just as two spaces do ​

3 conformance fixtures

A footnote body's own column is fixed at two ("A footnote body's own column is two, and a third column is its text"), but reaching that column is column arithmetic (§24 C1), not a count of space characters: a tab from column 0 lands at column 4, already past the floor, so it satisfies the same requirement two literal spaces satisfy. A single space (column 1) still falls short and leaves the note, as it already does today (carve#692).

carve
[^a]: note

	more

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>
      <p>more<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A space then a tab reaches the same column (1, then to the next stop at 4), so it qualifies too:

carve
[^a]: note

 	more

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>
      <p>more<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

The blank line above is not what admits the tab - the column requirement is per line, so a tab-indented line directly under the definition, with no blank line at all, is a continuation too (and, with no blank between them, it folds into the same paragraph as a soft break, exactly as two spaces would):

carve
[^a]: note
	more

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
more<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
5 conformance fixtures

A footnote body whose last block is a paragraph gets its backlink appended directly into that paragraph (see above). When the last block is something else, the backlink is never folded into a paragraph found inside or before that block - a synthesized <p> after the last block holds it instead, as a sibling of that block (carve#688). Five shapes, previously unpinned:

A code block:

carve
[^a]: note
  ```
  code
  ```

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>
      <pre><code>code
</code></pre>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A block quote. The quote's own paragraph ("quoted") is not where the backlink goes - that would misattribute it to the quoted source. The synthesized paragraph is a sibling of the <blockquote>, not a child of it:

carve
[^a]: note
  > quoted

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>
      <blockquote><p>quoted</p></blockquote>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A table:

carve
[^a]: note

  | a |
  | - |
  | b |

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>
      <table>
        <thead>
          <tr><th scope="col">a</th></tr>
        </thead>
        <tbody>
          <tr><td>b</td></tr>
        </tbody>
      </table>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A div:

carve
[^a]: note

  ::: note
  d
  :::

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>
      <aside class="admonition note" aria-label="Note">
        <p>d</p>
      </aside>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A raw block. Its content is passed through verbatim by definition; appending the backlink inside it would put navigation markup into a region the author asked to be left untouched, so the synthesized paragraph follows it instead:

carve
[^a]: note

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

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>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A line at a footnote definition's own column, followed by non-blank text, forms its own tight block ​

1 conformance fixture

A footnote definition on a list item's own content column renders no trace (above), and none of the three reference engines loosens the item on account of it - agreed already. What was not settled is what a plain line right after the definition, with no blank line anywhere, does to the item. §10 I5 already answers half of it: an invisible construct interrupts an open paragraph exactly like a visible one, so the line after the definition starts a NEW block rather than folding back into the paragraph the definition ended. §17 L1/L2 answer the rest: nothing here is a blank line, so the item never loosens, and a tight item's paragraphs are ALL bare - the new block included, not only the first one. The item ends up holding two paragraph blocks with no blank between them, both unwrapped (carve#668; §17 L6).

carve
- a
  [^f]: x
  more

see[^f]
html
<ul>
  <li>a
    more
  </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>x<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

An empty footnote body is written with the {empty} sentinel ​

1 conformance fixture

"Footnote definition requires an inline body" above is a PARSE rule, and it leaves the canonical writer a problem: a footnote definition whose body holds no blocks cannot be written back as a bare [^label]:, because that line is not a definition - so the definition and every reference to it would come back as literal text. PART 11 §7b answers it. The writer emits the sentinel attribute block {empty}, which the definition line consumes as attributes and discards, leaving the body empty and the reference resolved.

{ } and {} do not work in this position, and they are the first two spellings a reader reaches for: a block-attribute line requires at least one attribute, so neither run is an attribute block here and both stay literal text inside the note.

carve
See[^f]

[^f]: {empty}
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><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

An empty inline note is literal ​

3 conformance fixtures

PART 9 §16 says it in as many words: "Empty or whitespace-only (^[], ^[ ]) is literal; an unclosed ^[… is literal." So ^[ does not open a note there.

What is left is ordinary text plus an ordinary bracketed run, and that matters for the third case below: a bare [] is literal, but []{.c} carries an attribute tail and is a span (PART 9 §14), so the ^ is the only part of ^[]{.c} that stays as written.

This needed pinning because the executable spec refused all three, and no corpus document held an empty note - 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#1188, the markup-carve/carve#755 class).

carve
x ^[]
html
<p>x ^[]</p>

Whitespace-only is the same case: a space between the brackets is not content.

carve
x ^[ ]
html
<p>x ^[ ]</p>

With an attribute block the brackets are a span, and only the ^ is literal.

carve
x ^[]{.c}
html
<p>x ^<span class="c"></span></p>

A note's content recognizes no note ​

4 conformance fixtures

PART 9 §16 on the inline form: "Content is INLINE-only, parsed recursively with footnote recognition DISABLED inside it (no ^[…] or [^ref] nested in a note, either direction)."

Disabled recognition makes the inner spelling ORDINARY TEXT rather than an unrenderable document. Inside a note ^[ opens nothing, so the ^ is text and [b] is a bracketed run; and [^1] is not a reference, so it is a bracketed run over the content ^1 - which is why the second case renders [^1] even though the document defines that label. The definition is then referenced by nothing and renders nothing of its own.

Recognition stays off for the WHOLE content, not one level of it: the third case holds a note spelling two deep and both stay literal.

The executable spec refused all three, and no corpus document nested a note in a note (markup-carve/carve#1188).

carve
x ^[a ^[b] c]
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 ^[b] c<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
x ^[a [^1] c]

[^1]: n
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 [^1] c<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
x ^[a ^[b ^[c] d] e]
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 ^[b ^[c] d] e<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

An attribute block on the inner spelling attaches to the bracketed run it turns out to be, on either side of the pair.

carve
x ^[a [^1]{.k} c]

[^1]: n
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 <span class="k">^1</span> c<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
2 conformance fixtures

PART 9 §16 records this as a LIMITATION: a footnote "inside link text ([t[^1]](u)) or inside a heading later cloned by a </#id> crossref nests an <a> in an <a>; avoid footnotes in those positions."

That is advice about what an author should expect, and it states the outcome. It does not put the document outside the language: the noteref lands where it was written, inside the link text, and the note takes its number from the one document-order sequence like any other.

Both note forms reach it the same way, which is what makes the pairing worth pinning - the executable spec rendered the inline form and refused the reference one (markup-carve/carve#1188).

carve
a [t[^1]](/u) b

[^1]: n
html
<p>a <a href="/u">t<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></a> b</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>n<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
a [t^[n]](/u) b
html
<p>a <a href="/u">t<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></a> b</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>n<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
3 conformance fixtures

The PART 9 §16 limitation is about LINK TEXT, not about one spelling of a link: "a footnote (reference [^1] or inline ^[…]) inside link text ([t[^1]](u)) or inside a heading later cloned by a </#id> crossref nests an <a> in an <a>". A reference tail reaches the same place by a different route, and reaches the same answer - the noteref lands where it was written and the note draws its number from the one document-order sequence.

The neighboring section pins the inline-tail half of that cross. This one pins the reference-tail half, which the executable spec used to refuse: its own resolution frame carried the link text through a JSON payload, and JSON.stringify escaped the frame's field separator, so the footnote pass never saw the noteref sitting in it (markup-carve/carve#1195).

carve
a [t[^1]][r] b

[r]: /u

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

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

[r]: /u

[^1]: n
html
<p>a <a href="/u">t<a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a></a> c <a id="fnref1-2" href="#fn1" role="doc-noteref"><sup>1</sup></a> b</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>n<a href="#fnref1" role="doc-backlink" aria-label="Back to reference 1">↩<sup>1</sup></a> <a href="#fnref1-2" role="doc-backlink" aria-label="Back to reference 2">↩<sup>2</sup></a></p>
    </li>
  </ol>
</section>

A note body's own references resolve ​

3 conformance fixtures

A footnote body is rendered when the endnotes list is built, which is after the document text has been walked. Whatever the body introduces - a reference link, another footnote, a reference link whose text holds a footnote - is therefore introduced late, and still has to be resolved.

The later note takes the next number in the same sequence, and its own body is resolved on the same terms, so the list can grow while it is being built.

carve
a [^1] b

[^1]: see [x][r]

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

[^1]: see [^2]

[^2]: two
html
<p>a <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> b</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>see <a id="fnref2" href="#fn2" role="doc-noteref"><sup>2</sup></a><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
    <li id="fn2">
      <p>two<a href="#fnref2" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
a [^1] b

[^1]: see [t[^2]][r]

[r]: /u

[^2]: two
html
<p>a <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> b</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>see <a href="/u">t<a id="fnref2" href="#fn2" role="doc-noteref"><sup>2</sup></a></a><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
    <li id="fn2">
      <p>two<a href="#fnref2" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
4 conformance fixtures

Resolving a reference is deferred: the tail is recorded when the inline pass reaches it and matched against the definitions afterwards. Everything the link text holds is carried across that gap, and comes out the other side unchanged - including the constructs whose own resolution is deferred the same way.

Two of those are worth stating outright. A reference link inside link text is still a link, so PART 3's rule that links never nest applies to it exactly as it applies to an inline one: the inner link flattens to its text. An image reference is not a link, so it stays, and an image inside an anchor is what the document asked for.

carve
a [t</#}>][r] b

[r]: /u
html
<p>a <a href="/u">t&lt;/#}&gt;</a> b</p>
carve
a [t[x][r2]][r] b

[r]: /u

[r2]: /v
html
<p>a <a href="/u">tx</a> b</p>
carve
a [t[x][r2]](/u) b

[r2]: /v
html
<p>a <a href="/u">tx</a> b</p>
carve
a [t![z][r2]][r] b

[r]: /u

[r2]: /i.png
html
<p>a <a href="/u">t<img src="/i.png" alt="z"></a> b</p>

An authored base carries opaque payload, captions, and nested metadata ​

4 conformance fixtures

An authored block base belongs to the whole structural group. An opaque fence payload is never scanned again for block openers, a caption moves with its target, and a nested footnote definition keeps both its body and its surrounding container ownership.

carve
[^n]: intro

   ~~~~
    ```
   ~~~~

see[^n]
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>intro</p>
      <pre><code> ```
</code></pre>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
[^n]: intro

    ![alt](image.png)
    ^ Caption

see[^n]
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>intro</p>
      <figure>
        <img src="image.png" alt="alt">
        <figcaption>Caption</figcaption>
      </figure>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
[^n]: intro

   ::: >
   > quote

see[^n]


```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>intro</p>
      <blockquote>
        <blockquote><p>quote</p></blockquote>
      </blockquote>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

:::

carve
[^outer]: intro

     [^inner]: note

     see[^inner]

see[^outer]
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>intro</p>
      <p>see<a id="fnref2" href="#fn2" role="doc-noteref"><sup>2</sup></a><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
    <li id="fn2">
      <p>note<a href="#fnref2" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A footnote in an unresolved reference is not a reference ​

4 conformance fixtures

An unresolved reference degrades to its literal source (PART 9R R1), so the link text it rendered is discarded rather than written into the document. A footnote reference or an inline note sitting in that text therefore references nothing: it draws no number, its definition stays unreferenced and is dropped, and no endnotes section is written on its account.

Counting it anyway is what a pipeline does when it numbers footnotes before it knows whether the reference resolved. The numbering says so out loud - the note a reader can see is then numbered as a repeat of a reference the document does not contain, and a lone one leaves an endnote whose backlink names an id no element carries.

carve
a [t[^1]][nope] b

[^1]: n
html
<p>a [t[^1]][nope] b</p>
carve
a [t[^1]][nope] b [^1] c

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

A bracketed run that never had a tail is not a reference at all: PART 9 §14 renders its content, so a note inside it is written and counts.

carve
a [t[^1]] b

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

An inline note's content resolves after the note ​

7 conformance fixtures

A note's content is rendered where it is written and placed where the endnotes go, so a construct inside it whose own resolution is deferred - a crossref, a reference link, a reference image - has to survive that move. It does: the note carries the unresolved construct across, and the construct resolves against the whole document once the note has been placed.

Whether it resolves is a separate question from whether it survives. An unresolved crossref inside a note renders as its literal source, exactly as it would outside one.

carve
a ^[see </#h>] b

# h
html
<p>a <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> b</p>
<section id="h">
  <h1>h</h1>
</section>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>see <a href="#h">h</a><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
a ^[see </#nope>] b
html
<p>a <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> b</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>see &lt;/#nope&gt;<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
a ^[see [t][r]] b

[r]: /u
html
<p>a <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> b</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>see <a href="/u">t</a><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
a ^[see ![z][r]] b

[r]: /i.png
html
<p>a <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> b</p>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>see <img src="/i.png" alt="z"><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A collapsed reference reaches the heading index from inside a note too, and the note's own attributes are unaffected by what its content holds.

carve
a ^[see [h][]] b

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

# h
html
<p>a <a id="fnref1" href="#fn1" role="doc-noteref" class="c"><sup>1</sup></a> b</p>
<section id="h">
  <h1>h</h1>
</section>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p><a href="#h">h</a><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A note reached from a footnote body is placed after the body that introduced it, and its own content resolves the same way.

carve
a [^1] b

[^1]: see ^[</#h>]

# h
html
<p>a <a id="fnref1" href="#fn1" role="doc-noteref"><sup>1</sup></a> b</p>
<section id="h">
  <h1>h</h1>
</section>
<section role="doc-endnotes" aria-label="Footnotes">
  <hr>
  <ol>
    <li id="fn1">
      <p>see <a id="fnref2" href="#fn2" role="doc-noteref"><sup>2</sup></a><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
    <li id="fn2">
      <p><a href="#h">h</a><a href="#fnref2" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

Footnotes ​

2 conformance fixtures

A footnote definition that is never referenced produces no endnotes section.

carve
text
[^f]: note
html
<p>text</p>
carve
Wrapped[^two
words].

[^two words]: This definition is not referenced.

[^broken
label]: This is not a definition.
html
<p>Wrapped[^two
words].</p>
<p>[^broken
label]: This is not a definition.</p>

A definition list inside a footnote body carries its authored base ​

3 conformance fixtures

A definition list is a recognized opener, so it belongs to the footnote body at or past that body's minimum column (PART 0, carve#1781). The definition then is the innermost open container: a quote reaching its content column belongs to the definition, whether the definition list itself was written at or past the footnote's minimum.

carve
[^n]: intro

  :: term
  :  definition

     > quote

see[^n]
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>intro</p>
      <dl>
        <dt>term</dt>
        <dd>
          <p>definition</p>
          <blockquote><p>quote</p></blockquote>
        </dd>
      </dl>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

Written PAST the footnote column, the definition list itself first takes a local base. That does not change the nested result: ownership is resolved from the innermost container outward.

carve
[^n]: intro

   :: term
   :  definition

      > quote

see[^n]
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>intro</p>
      <dl>
        <dt>term</dt>
        <dd>
          <p>definition</p>
          <blockquote><p>quote</p></blockquote>
        </dd>
      </dl>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

Below the definition's content column, the definition ends. The quote still reaches the surviving footnote body, where the shared rule recognizes it as a structural sibling rather than literal marker text.

carve
[^n]: intro

   :: term
   :  definition

     > quote

see[^n]
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>intro</p>
      <dl>
        <dt>term</dt>
        <dd>definition</dd>
      </dl>
      <blockquote><p>quote</p></blockquote>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A recognized opener in a body needs no blank line above it ​

9 conformance fixtures

The authored-base clause (PART 9 SS17, PART 9 SS24 C3, carve#1729) says where an opener may sit, not what has to sit above it. A recognized opener at or past the body's minimum column belongs to that body whether a blank line precedes it or not, so it ends whatever block is open and starts its own. A footnote body, a definition body and a list item all answer alike.

carve
[^n]: intro
  > quote
  # heading

see[^n]
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>intro</p>
      <blockquote><p>quote</p></blockquote>
      <h1 id="heading">heading</h1>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>
carve
:: term
:  intro
   > quote
   # heading
html
<dl>
  <dt>term</dt>
  <dd>
    <p>intro</p>
    <blockquote><p>quote</p></blockquote>
    <h1 id="heading">heading</h1>
  </dd>
</dl>
carve
- intro
  > quote
  # heading
html
<ul>
  <li>intro
    <blockquote><p>quote</p></blockquote>
    <h1 id="heading">heading</h1>
  </li>
</ul>

Being an opener is the whole of it. A line at the same place that opens nothing is not rebased and does not end anything: it lazily continues the quote, and the extra indentation is not content either.

carve
[^n]: intro
  > quote
    ordinary line

see[^n]
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>intro</p>
      <blockquote><p>quote
ordinary line</p></blockquote>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

The rule reaches every member of a run, not only the first. Each opener ends the block the one before it started.

carve
[^n]: intro
  > quote
  # heading
  - item

see[^n]
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>intro</p>
      <blockquote><p>quote</p></blockquote>
      <h1 id="heading">heading</h1>
      <ul>
        <li>item</li>
      </ul>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

The clause is about bodies, and the top level is not one. With no minimum content column to reach, an indented opener under an open paragraph stays column-strict and folds into it as text.

carve
intro
   # heading
html
<p>intro
# heading</p>

A description line is the other place a blank line turns out not to matter - but the clause says where an opener may sit, and a description body's floor is its own content column. An opener BELOW that column does not reach the body at all: the body ends there and the opener is classified in whatever context survives it (PART 9, BELOW THE BODY'S COLUMN THE BODY ENDS). At the top level that context needs column 0, so a > one column in opens nothing.

carve
:: term
:  definition
 > quote
html
<dl>
  <dt>term</dt>
  <dd>definition</dd>
</dl>
<p>&gt; quote</p>

Inside a list item the surviving context is the item, and the same quote reaches the ITEM's content column - so it opens there, as a sibling of the definition list rather than inside the dd. The base the definition list established governs the definition list, not the next opener written below it.

carve
- intro

  :: term
  :  definition
   > quote
html
<ul>
  <li>intro
    <dl>
      <dt>term</dt>
      <dd>definition</dd>
    </dl>
    <blockquote><p>quote</p></blockquote>
  </li>
</ul>

A footnote body follows the same surviving-context rule. The quote is below the description's column, so the description ends; it still reaches the footnote's minimum column and therefore opens a structural sibling there.

carve
[^n]: intro

   :: term
   :  definition
    > quote

see[^n]
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>intro</p>
      <dl>
        <dt>term</dt>
        <dd>definition</dd>
      </dl>
      <blockquote><p>quote</p></blockquote>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

One authored base rule reaches a definition nested in a list item ​

2 conformance fixtures

List items, footnotes, and definitions use the same PART 0 rule. In this document the definition list opens one column past the item's minimum, then the definition body becomes the innermost owner. Its blank line does not discard the containing block's base, so the quote at the definition's content column remains in the dd, exactly as it does when the outer container is a footnote.

carve
- intro

   :: term
   :  definition

      > quote
html
<ul>
  <li>intro
    <dl>
      <dt>term</dt>
      <dd>
        <p>definition</p>
        <blockquote><p>quote</p></blockquote>
      </dd>
    </dl>
  </li>
</ul>

Nor is the innermost owner a definition body in particular. A LIST ITEM opened at a footnote body's own column owns the lines below it the same way, so a quote written at that item's content column stays in the item rather than being rebased to the body's column and lifted out of it.

carve
[^n]: intro

  - item

    > quote

see[^n]
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>intro</p>
      <ul>
        <li>item
          <blockquote><p>quote</p></blockquote>
        </li>
      </ul>
      <p><a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

A comment in a footnote body is invisible in both spellings ​

2 conformance fixtures

A comment is on the invisible-line list in every host (§10 I5), so in a footnote body at the body's minimum column it renders nothing and closes the open paragraph - more is the body's SECOND paragraph, not a continuation of intro. The footnote-body host had no document for either comment spelling, which left the classification's first two properties resting on prose here.

carve
[^a]: intro
  %% c
  more

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>intro</p>
      <p>more<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

The fence spelling answers the same, body and closer travelling with the opener. Leaving the fence form out is what let one delimiter's difference make the same rule answer twice in the list-item host (carve#629, carve#634), so the new host gets both rows rather than one.

carve
[^a]: intro
  %%%
  c
  %%%
  more

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>intro</p>
      <p>more<a href="#fnref1" role="doc-backlink" aria-label="Back to reference">↩</a></p>
    </li>
  </ol>
</section>

Released under the MIT License.