summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/inlines.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/inlines.c b/src/inlines.c
index 0ff5e0f..872a9c3 100644
--- a/src/inlines.c
+++ b/src/inlines.c
@@ -254,6 +254,7 @@ scan_delims(subject* subj, unsigned char c, bool * can_open, bool * can_close)
before_char = 10;
} else {
before_char_pos = subj->pos - 1;
+ // walk back to the beginning of the UTF_8 sequence:
while (peek_at(subj, before_char_pos) >> 6 == 2 &&
before_char_pos > 0) {
before_char_pos -= 1;