diff --git a/src/inlines.c b/src/inlines.c index 0c1bc36b1..695bbd0c4 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -446,6 +446,7 @@ static int scan_delims(subject *subj, unsigned char c, bool *can_open, } if (before_char >= 0xfe00 && before_char <= 0xfe02) { // standard variation selector, go back one more code point: + before_char_pos -= 1; while (peek_at(subj, before_char_pos) >> 6 == 2 && before_char_pos > 0) { before_char_pos -= 1; diff --git a/src/utf8.c b/src/utf8.c index 3d0c36e52..55758bf04 100644 --- a/src/utf8.c +++ b/src/utf8.c @@ -478,7 +478,7 @@ int cmark_utf8proc_is_CJK(int32_t uc) { || (uc >= 0x30000 && uc <= 0x3134F) // CJK Unified Ideographs Extension G || (uc >= 0x31350 && uc <= 0x323AF) // CJK Unified Ideographs Extension H // || (uc >= 0x323B0 && */ uc <= 0x3FFFF) // Unused TIP region (probably CJK characters will be allocated) - || (uc >= 0xE0100 && uc <= 0xE01FF) // Ideographic Variation Sequences + || (uc >= 0xE0100 && uc <= 0xE01EF) // Ideographic Variation Sequences ); } } diff --git a/test/cjkemphasis.txt b/test/cjkemphasis.txt index d8b718a64..a0a04110d 100644 --- a/test/cjkemphasis.txt +++ b/test/cjkemphasis.txt @@ -590,9 +590,9 @@ Git**(注:不是GitHub)** ```````````````````````````````` example -**(U+317DB)** +𱟛**(U+317DB)** . -

(U+317DB)

+

𱟛(U+317DB)

```````````````````````````````` @@ -618,9 +618,9 @@ Git**(注:不是GitHub)** ```````````````````````````````` example -大塚︀**(or 大塚 / 大塚)** +大塚︀**(U+585A U+FE00)** 大塚**(U+FA10)** . -

大塚︀(or 大塚 / 大塚)

+

大塚︀(U+585A U+FE00) 大塚(U+FA10)

````````````````````````````````