Commit 9ba57ccb2ee1b90c845ad1af57a82f0bafb5038e

Martin Mitas 2020-12-14T19:53:58

md_link_label_cmp_load_fold_info: Remove a bogus code. The input into the function is already guaranted to not have a new line characters. (And handling of them in the function was broken anyway.)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/md4c.c b/src/md4c.c
index 0883a9e..19ba212 100644
--- a/src/md4c.c
+++ b/src/md4c.c
@@ -1561,12 +1561,6 @@ md_link_label_cmp_load_fold_info(const CHAR* label, OFF off, SZ size,
         goto whitespace;
     }
 
-    if(ISNEWLINE_(label[off])) {
-        /* Treat new lines as a whitespace. */
-        off++;
-        goto whitespace;
-    }
-
     codepoint = md_decode_unicode(label, off, size, &char_size);
     off += char_size;
     if(ISUNICODEWHITESPACE_(codepoint)) {