all repos — honk @ 72b41af4afe123bd7a6b644e8e86b7c2ab39ed8d

my fork of honk

when smashing zalgo, don't count ascii
Ted Unangst tedu@tedunangst.com
Thu, 29 Feb 2024 00:50:53 -0500
commit

72b41af4afe123bd7a6b644e8e86b7c2ab39ed8d

parent

d0055aa30deba7962c9cfce17cac018bc4d3dd9a

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M skulduggery.goskulduggery.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 }