Skip to content

Model boundary and fallback cases ​

Syntax ownership, inline frames, and table metadata.

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

Model syntax boundaries and ownership ​

6 conformance fixtures
carve
::: e[]
html
<div class="e">

</div>
carve
> u
+
# H
-
html
<blockquote>
  <p>u</p>
  <h1 id="H">H</h1>
</blockquote>
<p>-</p>
carve
||
|-|
|-|
html
<table>
  <thead>
    <tr><th scope="col"></th></tr>
  </thead>
  <tbody>
    <tr><td>-</td></tr>
  </tbody>
</table>
carve
- 	- B
html
<ul>
  <li>- B</li>
</ul>
carve
{x} {k}
a
html
<p>{x} {k}
a</p>
carve
- {{ c@code }}
html
<ul>
  <li>{{ c@code }}</li>
</ul>

Model inline frames and HTML attributes ​

6 conformance fixtures
carve
[a](/u){href=/v}
html
<p><a href="/u">a</a></p>
carve
![a](/u){src=/v}
html
<img src="/u" alt="a">
carve
=>g=
html
<p>=&gt;g=</p>
carve
[[][]]()
html
<p><a href="">[][]</a></p>
carve
::: footnotes
x
y
html
<div class="footnotes">
  <p>x
y</p>
</div>
carve
{{ d @lines:0 }}*a*
html
<p>{{ d @lines:0 }}<strong>a</strong></p>

Invalid table metadata keeps the table ​

3 conformance fixtures
carve
{header-rows=2 footer-rows=1}
| a | b |
html
<table>
  <tbody>
    <tr><td>a</td><td>b</td></tr>
  </tbody>
</table>
carve
{footer-rows=>}
| a | b |
html
<table>
  <tbody>
    <tr><td>a</td><td>b</td></tr>
  </tbody>
</table>
carve
{aligns=right,left,center}
| a | b |
html
<table>
  <tbody>
    <tr><td style="text-align: right;">a</td><td style="text-align: left;">b</td></tr>
  </tbody>
</table>

Released under the MIT License.