jgm / djot

A light markup language
https://djot.net
MIT License
1.66k stars 43 forks source link

Div fence inside code block #109

Closed hellux closed 1 year ago

hellux commented 1 year ago

Divs can be closed by a verbatim fence inside a code block:

::: outer

:::


:::
<div class="outer">
<pre><code></code></pre>
</div>
<pre><code>
:::
</code></pre>

Is this intended? It is certainly easier to parse this way, not having to ignore fences inside code blocks.

An easy user workaround is to simply use a longer fence:

:::: outer

:::


::::
<div class="outer">
<pre><code>:::
</code></pre>
</div>
jgm commented 1 year ago

I don't think this was explicitly intended, and it seems an odd result! I'm going to call it a bug, pending further thought and investigation.