Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/md4c.c
Original file line number Diff line number Diff line change
Expand Up @@ -6752,7 +6752,7 @@ md_analyze_line(MD_CTX* ctx, OFF beg, OFF* p_end,

while(true) {
/* Check whether we are fenced code continuation. */
if(pivot_line->type == MD_LINE_FENCEDCODE) {
if(pivot_line->type == MD_LINE_FENCEDCODE && n_parents == ctx->n_containers) {
line->beg = off;

/* We are another MD_LINE_FENCEDCODE unless we are closing fence
Expand Down
51 changes: 51 additions & 0 deletions test/regressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,57 @@ Closing the empty item must keep the remaining block quote markers consumed.
</blockquote>
````````````````````````````````

## Fence-like line outside the container of an open code fence

A line which does not continue the container (block quote or list item)
holding an open code fence ends that container, so it cannot close the
fence, and it must not be eaten either.

```````````````````````````````` example
> ```
> code
```
after
.
<blockquote>
<pre><code>code
</code></pre>
</blockquote>
<pre><code>after
</code></pre>
````````````````````````````````

```````````````````````````````` example
- ```
code
```
after
.
<ul>
<li>
<pre><code>code
</code></pre>
</li>
</ul>
<pre><code>after
</code></pre>
````````````````````````````````

```````````````````````````````` example
> ```
> code
``
after
.
<blockquote>
<pre><code>code
</code></pre>
</blockquote>
<p>``
after</p>
````````````````````````````````


## [PR 443](https://github.com/mity/md4c/pull/443)

DEL (U+007F) is a control character, so it ends an unbracketed link destination
Expand Down