Commit 7a2de41
feat: enhance Asian character detection per iblea's suggestion
Improved Unicode width calculation for Korean and Japanese characters
by adding dedicated checkAsianCharacter helper function.
Changes:
- Add checkAsianCharacter() with comprehensive Korean/Japanese ranges:
* Korean Hangul (unicode.Hangul)
* Korean Hangul Jamo (0x1100-0x11FF)
* Korean Hangul Compatibility Jamo (0x3130-0x318F)
* Enclosed CJK Letters (0x3200-0x32FF)
* Japanese Hiragana (unicode.Hiragana)
* Japanese Katakana (unicode.Katakana)
- Add Miscellaneous Technical emoji range (0x2300-0x23FF) for clock
symbols and similar emoji
- Add comprehensive tests for Korean/Japanese character detection
- Add TestCheckAsianCharacter for validating the helper function
Credit: Implementation based on iblea's code review suggestion
on PR charmbracelet#563
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 8ef3297 commit 7a2de41
2 files changed
+47
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
63 | 77 | | |
64 | 78 | | |
65 | 79 | | |
| |||
68 | 82 | | |
69 | 83 | | |
70 | 84 | | |
| 85 | + | |
71 | 86 | | |
72 | 87 | | |
73 | | - | |
74 | | - | |
| 88 | + | |
75 | 89 | | |
76 | 90 | | |
77 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
| |||
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
82 | 113 | | |
0 commit comments