summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inlines.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/inlines.c b/src/inlines.c
index 3040f09..cd2d124 100644
--- a/src/inlines.c
+++ b/src/inlines.c
@@ -767,10 +767,13 @@ node_inl *parse_chunk_inlines(chunk *chunk, reference_map *refmap)
static int subject_find_special_char(subject *subj)
{
+ static const char CHARS[] = "\n\\`&_*[]<!";
+ static const size_t CHARS_SIZE = sizeof(CHARS) - 1;
+
int n = subj->pos + 1;
while (n < subj->input.len) {
- if (strchr("\n\\`&_*[]<!", subj->input.data[n]))
+ if (memchr(CHARS, subj->input.data[n], CHARS_SIZE))
return n;
n++;
}