summaryrefslogtreecommitdiff
path: root/src/blocks.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-08-09 21:22:49 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-08-09 21:22:49 -0700
commit50114ff73006e97bc60761191dfd0ac8024aea73 (patch)
tree005f9626976129e246f8f87c6e21389e11dc1493 /src/blocks.c
parent8a3abfdb1c4dbe65b83b3df6b450a93a8a7eb170 (diff)
Fixed bug with HRULE after blank line.
This previously caused cmark to break out of a list, thinking it had two consecutive blanks.
Diffstat (limited to 'src/blocks.c')
-rwxr-xr-xsrc/blocks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blocks.c b/src/blocks.c
index 6b2e14d..6d3053b 100755
--- a/src/blocks.c
+++ b/src/blocks.c
@@ -812,7 +812,6 @@ static void S_process_line(cmark_parser *parser, const unsigned char *buffer,
// it's only now that we know the line is not part of a setext header:
container =
add_child(parser, container, NODE_HRULE, parser->first_nonspace + 1);
- container = finalize(parser, container);
S_advance_offset(parser, &input, input.len - 1 - parser->offset, false);
} else if ((matched =
@@ -898,6 +897,7 @@ static void S_process_line(cmark_parser *parser, const unsigned char *buffer,
container->last_line_blank =
(parser->blank && container->type != NODE_BLOCK_QUOTE &&
container->type != NODE_HEADER &&
+ container->type != NODE_HRULE &&
!(container->type == NODE_CODE_BLOCK && container->as.code.fenced) &&
!(container->type == NODE_ITEM && container->first_child == NULL &&
container->start_line == parser->line_number));