diff options
Diffstat (limited to 'src/inlines.c')
-rw-r--r-- | src/inlines.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inlines.c b/src/inlines.c index e2641a7..3e298de 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -636,7 +636,7 @@ unsigned char *cmark_clean_url(cmark_chunk *url) } cmark_strbuf_unescape(&buf); - return cmark_strbuf_detach(&buf); + return buf.size == 0 ? NULL : cmark_strbuf_detach(&buf); } unsigned char *cmark_clean_title(cmark_chunk *title) @@ -660,7 +660,7 @@ unsigned char *cmark_clean_title(cmark_chunk *title) } cmark_strbuf_unescape(&buf); - return cmark_strbuf_detach(&buf); + return buf.size == 0 ? NULL : cmark_strbuf_detach(&buf); } // Parse an autolink or HTML tag. |