- Commit
- a1eff0bc5359d4defaf3f0e96742daaf36985f08
- Parent
- a0f6493dda58a0ab905a80c73c19b1d76ff0c977
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Optimized the change in 72a556fd3bd17feaffba2fb6faa8c8f2a3931643.
Thanks @Knagis.
My personal build of CMark ✏️
Optimized the change in 72a556fd3bd17feaffba2fb6faa8c8f2a3931643.
Thanks @Knagis.
1 file changed, 6 insertions, 4 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | src/inlines.c | 10 | 6 | 4 |
diff --git a/src/inlines.c b/src/inlines.c @@ -682,7 +682,6 @@ static cmark_node* handle_close_bracket(subject* subj, cmark_node *parent) cmark_chunk urlcmark_chunk, titlecmark_chunk; unsigned char *url, *title; delimiter *opener; - delimiter *tmp_delim; cmark_node *link_text; cmark_node *inl; cmark_chunk raw_label; @@ -809,11 +808,14 @@ match: if (!is_image) { opener = subj->last_delim; while (opener != NULL) { - tmp_delim = opener->previous; if (opener->delim_char == '[') { - opener->active = false; + if (!opener->active) { + break; + } else { + opener->active = false; + } } - opener = tmp_delim; + opener = opener->previous; } }