diff --git a/src/blocks.c b/src/blocks.c index 8ff339ee4..b0db722cd 100644 --- a/src/blocks.c +++ b/src/blocks.c @@ -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: diff --git a/test/regression.txt b/test/regression.txt index 1426617ab..454be0cb8 100644 --- a/test/regression.txt +++ b/test/regression.txt @@ -108,6 +108,24 @@ City:

```````````````````````````````` +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` +. +
+

a b

+
+ +```````````````````````````````` + Issue #530 - link parsing corner cases ```````````````````````````````` example