summaryrefslogtreecommitdiff
path: root/src/blocks.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-22 21:13:22 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-22 21:13:22 -0800
commita3be6dc81c971fa1b3c656d82f7e96794d510212 (patch)
treef8560dcb764082fc49933db19ec7a53f54fb37ac /src/blocks.c
parente8809f7e448bffc51adac1f2e143d99496d6a55f (diff)
Fixed #192.
The C and JS implementations were not registering blank lines after atx headers for purposes of tight/loose list calculation. Exmaple: * item * # block1 ## block2
Diffstat (limited to 'src/blocks.c')
-rw-r--r--src/blocks.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/blocks.c b/src/blocks.c
index 48ca7e7..7def4c8 100644
--- a/src/blocks.c
+++ b/src/blocks.c
@@ -553,6 +553,9 @@ void cmark_process_line(cmark_doc_parser *parser, const char *buffer,
// a header can never contain more than one line
all_matched = false;
+ if (blank) {
+ container->last_line_blank = true;
+ }
} else if (container->type == NODE_FENCED_CODE) {
@@ -566,6 +569,7 @@ void cmark_process_line(cmark_doc_parser *parser, const char *buffer,
} else if (container->type == NODE_HTML) {
if (blank) {
+ container->last_line_blank = true;
all_matched = false;
}