diff options
Diffstat (limited to 'src/blocks.c')
-rw-r--r-- | src/blocks.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/blocks.c b/src/blocks.c index 6031c18..a5e667e 100644 --- a/src/blocks.c +++ b/src/blocks.c @@ -851,12 +851,13 @@ static void open_new_blocks(cmark_parser *parser, cmark_node **container, input, parser->first_nonspace))) { bufsize_t hashpos; int level = 0; + bufsize_t heading_startpos = parser->first_nonspace; S_advance_offset(parser, input, parser->first_nonspace + matched - parser->offset, false); *container = - add_child(parser, *container, CMARK_NODE_HEADING, parser->offset + 1); + add_child(parser, *container, CMARK_NODE_HEADING, heading_startpos + 1); hashpos = cmark_chunk_strchr(input, '#', parser->first_nonspace); |