File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -425,13 +425,13 @@ static void postprocess_text(cmark_parser *parser, cmark_node *text) {
425
425
cmark_node_insert_after (text , link_node );
426
426
427
427
cmark_node * post = cmark_node_new_with_mem (CMARK_NODE_TEXT , parser -> mem );
428
- post -> as .literal = cmark_chunk_dup (& text -> as . literal ,
429
- (bufsize_t )(offset + max_rewind + link_end ),
428
+ post -> as .literal = cmark_chunk_dup (& detached_chunk ,
429
+ (bufsize_t )(start + link_end ),
430
430
(bufsize_t )(remaining - link_end ));
431
431
432
432
cmark_node_insert_after (link_node , post );
433
433
434
- text -> as .literal = cmark_chunk_dup (& text -> as . literal , 0 , offset + max_rewind - rewind );
434
+ text -> as .literal = cmark_chunk_dup (& detached_chunk , start - offset - max_rewind , offset + max_rewind - rewind );
435
435
cmark_chunk_to_cstr (parser -> mem , & text -> as .literal );
436
436
437
437
text = post ;
You can’t perform that action at this time.
0 commit comments