diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-02-17 21:20:17 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-02-17 21:20:17 -0800 |
commit | 0f90fc3f7ec06dd032ab28ef0478c415f831862f (patch) | |
tree | 8efd889c40ec1bc9748759ce781927cf9913e299 | |
parent | 2f4cbcb9957a2840735a547cc846eeb566262a44 (diff) |
Moved a test outside a loop.
-rw-r--r-- | src/inlines.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/inlines.c b/src/inlines.c index cc96141..4e6a30a 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -277,11 +277,13 @@ scan_delims(subject* subj, unsigned char c, bool * can_open, bool * can_close) } } - while (peek_char(subj) == c) { + if (c == '\'' || c == '"') { numdelims++; - advance(subj); - if (c == '\'' || c == '"') { - break; // limit to 1 delim for quotes + advance(subj); // limit to 1 delim for quotes + } else { + while (peek_char(subj) == c) { + numdelims++; + advance(subj); } } |