diff options
author | Brian Anderson <andersrb@gmail.com> | 2015-09-21 12:41:18 -0700 |
---|---|---|
committer | Brian Anderson <andersrb@gmail.com> | 2015-09-21 12:41:18 -0700 |
commit | 49c64b3cb5999cad0118fa5cb0cc60f5fcc70493 (patch) | |
tree | dd136dcea4700b26582bcd950ccacf1f19c2dd86 /src/autolink.h | |
parent | 794d91b37020242446c53713c7ce0c09b33b5f0c (diff) | |
parent | ca4609d56a77378ef9cf6dd3caff3aec006ecce9 (diff) | |
download | rust-hoedown-master.tar.gz |
Upgrade hoedown to 3.0.5.
Diffstat (limited to 'src/autolink.h')
-rw-r--r-- | src/autolink.h | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/src/autolink.h b/src/autolink.h index 8860ee2..528885c 100644 --- a/src/autolink.h +++ b/src/autolink.h @@ -9,24 +9,35 @@ extern "C" { #endif -enum { + +/************* + * CONSTANTS * + *************/ + +typedef enum hoedown_autolink_flags { HOEDOWN_AUTOLINK_SHORT_DOMAINS = (1 << 0) -}; +} hoedown_autolink_flags; + + +/************* + * FUNCTIONS * + *************/ + +/* hoedown_autolink_is_safe: verify that a URL has a safe protocol */ +int hoedown_autolink_is_safe(const uint8_t *data, size_t size); -int -hoedown_autolink_is_safe(const uint8_t *link, size_t link_len); +/* hoedown_autolink__www: search for the next www link in data */ +size_t hoedown_autolink__www(size_t *rewind_p, hoedown_buffer *link, + uint8_t *data, size_t offset, size_t size, hoedown_autolink_flags flags); -size_t -hoedown_autolink__www(size_t *rewind_p, hoedown_buffer *link, - uint8_t *data, size_t offset, size_t size, unsigned int flags); +/* hoedown_autolink__email: search for the next email in data */ +size_t hoedown_autolink__email(size_t *rewind_p, hoedown_buffer *link, + uint8_t *data, size_t offset, size_t size, hoedown_autolink_flags flags); -size_t -hoedown_autolink__email(size_t *rewind_p, hoedown_buffer *link, - uint8_t *data, size_t offset, size_t size, unsigned int flags); +/* hoedown_autolink__url: search for the next URL in data */ +size_t hoedown_autolink__url(size_t *rewind_p, hoedown_buffer *link, + uint8_t *data, size_t offset, size_t size, hoedown_autolink_flags flags); -size_t -hoedown_autolink__url(size_t *rewind_p, hoedown_buffer *link, - uint8_t *data, size_t offset, size_t size, unsigned int flags); #ifdef __cplusplus } |