diff options
author | Robin Jarry <robin@jarry.cc> | 2024-06-15 23:10:33 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-06-16 14:04:29 +0200 |
commit | 99bc69918ea782603894de8ab5f66d53a10046a2 (patch) | |
tree | 96353f25576b6439f251571fbf741dfce1b48b5b /commands/msgview/open.go | |
parent | 73bcb4661460d44817de2904fec14a69af819f43 (diff) | |
download | aerc-99bc69918ea782603894de8ab5f66d53a10046a2.tar.gz |
wrap: fix wide CJK characters support
Neither Chinese, Japanese nor Korean use spaces as words separators. It
is OK to hard wrap before any symbol (except CJK punctuation which
should probably stay attached to its previous symbol and not be left
alone at the start of a line).
I did not include Japanese Hiragana and Katakana symbols as word breaks
on purpose since these are phonetic alphabets. It didn't make sense to
wrap a line in the middle of a "word" made of these phonetic symbols.
Update the code to allow considering either a space or a CJK known
symbol as a split point for hard wrapping.
Add test case with Chinese, Japanese and Korean generated lorem ipsum
style text.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Runxi Yu <me@runxiyu.org>
Diffstat (limited to 'commands/msgview/open.go')
0 files changed, 0 insertions, 0 deletions