Skip to content
Merged
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
3 changes: 3 additions & 0 deletions src/blocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,9 @@ static void add_text_to_container(cmark_parser *parser, cmark_node *container,
if (parser->current != last_matched_container &&
container == last_matched_container && !parser->blank &&
S_type(parser->current) == CMARK_NODE_PARAGRAPH) {
// Like any paragraph line, skip the leading spaces and tabs.
S_advance_offset(parser, input, parser->first_nonspace - parser->offset,
false);
add_line(input, parser);
} else { // not a lazy continuation
// Finalize any blocks that were not matched and set cur to container:
Expand Down
18 changes: 18 additions & 0 deletions test/regression.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,24 @@ City:
</span></p>
````````````````````````````````

The leading spaces of a lazy continuation line are not part of the
paragraph content, as for any other paragraph line.

```````````````````````````````` example
> `a
b`

- `c
d`
.
<blockquote>
<p><code>a b</code></p>
</blockquote>
<ul>
<li><code>c d</code></li>
</ul>
````````````````````````````````

Issue #530 - link parsing corner cases

```````````````````````````````` example
Expand Down
Loading