API: let's stick to is_*
This commit is contained in:
parent
bdefe91629
commit
9af2b5587e
3 changed files with 5 additions and 5 deletions
|
@ -10,7 +10,7 @@
|
|||
#endif
|
||||
|
||||
int
|
||||
hoedown_autolink_issafe(const uint8_t *link, size_t link_len)
|
||||
hoedown_autolink_is_safe(const uint8_t *link, size_t link_len)
|
||||
{
|
||||
static const size_t valid_uris_count = 5;
|
||||
static const char *valid_uris[] = {
|
||||
|
@ -250,7 +250,7 @@ hoedown_autolink__url(
|
|||
while (rewind < max_rewind && isalpha(data[-rewind - 1]))
|
||||
rewind++;
|
||||
|
||||
if (!hoedown_autolink_issafe(data - rewind, size + rewind))
|
||||
if (!hoedown_autolink_is_safe(data - rewind, size + rewind))
|
||||
return 0;
|
||||
|
||||
link_end = strlen("://");
|
||||
|
|
|
@ -14,7 +14,7 @@ enum {
|
|||
};
|
||||
|
||||
int
|
||||
hoedown_autolink_issafe(const uint8_t *link, size_t link_len);
|
||||
hoedown_autolink_is_safe(const uint8_t *link, size_t link_len);
|
||||
|
||||
size_t
|
||||
hoedown_autolink__www(size_t *rewind_p, struct hoedown_buffer *link,
|
||||
|
|
|
@ -64,7 +64,7 @@ rndr_autolink(struct hoedown_buffer *ob, const struct hoedown_buffer *link, enum
|
|||
return 0;
|
||||
|
||||
if ((options->flags & HOEDOWN_HTML_SAFELINK) != 0 &&
|
||||
!hoedown_autolink_issafe(link->data, link->size) &&
|
||||
!hoedown_autolink_is_safe(link->data, link->size) &&
|
||||
type != HOEDOWN_AUTOLINK_EMAIL)
|
||||
return 0;
|
||||
|
||||
|
@ -269,7 +269,7 @@ rndr_link(struct hoedown_buffer *ob, const struct hoedown_buffer *link, const st
|
|||
{
|
||||
struct hoedown_html_renderopt *options = opaque;
|
||||
|
||||
if (link != NULL && (options->flags & HOEDOWN_HTML_SAFELINK) != 0 && !hoedown_autolink_issafe(link->data, link->size))
|
||||
if (link != NULL && (options->flags & HOEDOWN_HTML_SAFELINK) != 0 && !hoedown_autolink_is_safe(link->data, link->size))
|
||||
return 0;
|
||||
|
||||
BUFPUTSL(ob, "<a href=\"");
|
||||
|
|
Loading…
Reference in a new issue