diff options
author | Kevin Wojniak <kainjow@kainjow.com> | 2015-08-06 09:07:23 -0700 |
---|---|---|
committer | Kevin Wojniak <kainjow@kainjow.com> | 2015-08-06 09:07:23 -0700 |
commit | 2f393322635cbc1eea0fd75ac17c00d01fe42176 (patch) | |
tree | 175729d6e58e3da3d2fdcd99c69d7dbd209e7a0d /src/inlines.c | |
parent | d9f5a3fe2555ecf9d64e392d8febf551c60ddbe5 (diff) |
Prefix utf8proc functions to avoid conflict with existing library
Diffstat (limited to 'src/inlines.c')
-rwxr-xr-x[-rw-r--r--] | src/inlines.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/inlines.c b/src/inlines.c index ba78278..f8e2575 100644..100755 --- a/src/inlines.c +++ b/src/inlines.c @@ -283,7 +283,7 @@ static int scan_delims(subject *subj, unsigned char c, bool *can_open, while (peek_at(subj, before_char_pos) >> 6 == 2 && before_char_pos > 0) { before_char_pos -= 1; } - len = utf8proc_iterate(subj->input.data + before_char_pos, + len = cmark_utf8proc_iterate(subj->input.data + before_char_pos, subj->pos - before_char_pos, &before_char); if (len == -1) { before_char = 10; @@ -300,24 +300,24 @@ static int scan_delims(subject *subj, unsigned char c, bool *can_open, } } - len = utf8proc_iterate(subj->input.data + subj->pos, + len = cmark_utf8proc_iterate(subj->input.data + subj->pos, subj->input.len - subj->pos, &after_char); if (len == -1) { after_char = 10; } - left_flanking = numdelims > 0 && !utf8proc_is_space(after_char) && - !(utf8proc_is_punctuation(after_char) && - !utf8proc_is_space(before_char) && - !utf8proc_is_punctuation(before_char)); + left_flanking = numdelims > 0 && !cmark_utf8proc_is_space(after_char) && + !(cmark_utf8proc_is_punctuation(after_char) && + !cmark_utf8proc_is_space(before_char) && + !cmark_utf8proc_is_punctuation(before_char)); right_flanking = - numdelims > 0 && !utf8proc_is_space(before_char) && - !(utf8proc_is_punctuation(before_char) && - !utf8proc_is_space(after_char) && !utf8proc_is_punctuation(after_char)); + numdelims > 0 && !cmark_utf8proc_is_space(before_char) && + !(cmark_utf8proc_is_punctuation(before_char) && + !cmark_utf8proc_is_space(after_char) && !cmark_utf8proc_is_punctuation(after_char)); if (c == '_') { *can_open = left_flanking && - (!right_flanking || utf8proc_is_punctuation(before_char)); + (!right_flanking || cmark_utf8proc_is_punctuation(before_char)); *can_close = right_flanking && - (!left_flanking || utf8proc_is_punctuation(after_char)); + (!left_flanking || cmark_utf8proc_is_punctuation(after_char)); } else if (c == '\'' || c == '"') { *can_open = left_flanking && !right_flanking; *can_close = right_flanking; |