when smashing zalgo, don't count ascii
Ted Unangst tedu@tedunangst.com
Thu, 29 Feb 2024 00:50:53 -0500
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
skulduggery.go
→
skulduggery.go
@@ -32,7 +32,7 @@ for _, c := range s {
if c == '\n' { continue } - if runewidth.RuneWidth(c) == 0 { + if c > 127 && runewidth.RuneWidth(c) == 0 { zw = true break }@@ -41,7 +41,7 @@ if zw {
x := make([]byte, 0, len(s)) zw = false for _, c := range s { - if runewidth.RuneWidth(c) == 0 { + if c > 127 && runewidth.RuneWidth(c) == 0 { if zw { continue }