Skip to content

Commit cfd56ef

Browse files
committed
Simplified logic
1 parent d0866dd commit cfd56ef

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

extensions/autolink.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,7 @@ static bool validate_protocol(char protocol[], uint8_t *data, int rewind) {
278278
}
279279
}
280280

281-
if (cmark_isalnum(data[-rewind - len - 1])) {
282-
return false;
283-
}
284-
285-
return true;
281+
return !cmark_isalnum(data[-rewind - len - 1]));
286282
}
287283

288284
static void postprocess_text(cmark_parser *parser, cmark_node *text, int offset, int depth) {

0 commit comments

Comments
 (0)