diff options
-rw-r--r-- | src/blocks.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/blocks.c b/src/blocks.c index 98868d3..5a293b2 100644 --- a/src/blocks.c +++ b/src/blocks.c @@ -1146,6 +1146,8 @@ static void S_process_line(cmark_parser *parser, const unsigned char *buffer, else cmark_strbuf_put(&parser->curline, buffer, bytes); + bytes = parser->curline.size; + // ensure line ends with a newline: if (bytes == 0 || !S_is_line_end_char(parser->curline.ptr[bytes - 1])) cmark_strbuf_putc(&parser->curline, '\n'); |