File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ pub fn utf8_str_visible_length(s string) int {
181181 // CJK Unified Ideographs Extension B-G
182182 // TODO: remove this workaround for v2's parser
183183 // vfmt off
184- if (r > = 0x0f9f8880 && r < = 0xf09f8a8f ) ||
184+ if (r > = 0xf09f8880 && r < = 0xf09f8a8f ) ||
185185 (r > = 0xf09f8c80 && r < = 0xf09f9c90 ) ||
186186 (r > = 0xf09fa490 && r < = 0xf09fa7af ) ||
187187 (r > = 0xf0a08080 && r < = 0xf180807f ) {
Original file line number Diff line number Diff line change @@ -97,3 +97,7 @@ fn test_wide_to_ansi() {
9797fn test_string_to_ansi_not_null_terminated () {
9898 assert string_to_ansi_not_null_terminated ('abc' ) == [u8 (97 ), 98 , 99 ]
9999}
100+
101+ fn test_utf8_str_visible_length () {
102+ assert utf8_str_visible_length ('𝐀𝐁𝐂' ) == 3
103+ }
You can’t perform that action at this time.
0 commit comments