there is entirely too much unicode
Ted Unangst tedu@tedunangst.com
Sat, 11 May 2019 09:34:20 -0400
1 files changed,
8 insertions(+),
5 deletions(-)
jump to
M
skulduggery.go
→
skulduggery.go
@@ -25,6 +25,8 @@ var bigboldshitz = "๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐"
var lilboldshitz = "๐๐๐๐๐๐๐ ๐ก๐ข๐ฃ๐ค๐ฅ๐ฆ๐ง๐จ๐ฉ๐ช๐ซ๐ฌ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ" var biggothshitz = "๐ฌ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ๐ด๐ต๐ถ๐ท๐ธ๐น๐บ๐ป๐ผ๐ฝ๐พ๐ฟ๐๐๐๐๐๐ " var lilgothshitz = "๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐" +var moegothshitz = "๐๐ ๐ฎ๐๐๐๐๐ณโ๐๐๐๐๐๐๐๐โ๐๐๐๐๐๐๐๐ " +var morgothshitz = "๐๐๐ ๐ก๐ข๐ฃ๐ค๐ฅ๐ฆ๐ง๐จ๐ฉ๐ช๐ซ๐ฌ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ๐ด๐ต๐ถ๐ท" var bigitalshitz = "๐จ๐ฉ๐ช๐ซ๐ฌ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ๐ด๐ต๐ถ๐ท๐ธ๐น๐บ๐ป๐ผ๐ฝ๐พ๐ฟ๐๐" var lilitalshitz = "๐๐๐๐ ๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐" var bigbangshitz = "๐ธ๐นโ๐ป๐ผ๐ฝ๐พโ๐๐๐๐๐โ๐โโโ๐๐๐๐๐๐๐โค"@@ -34,10 +36,11 @@
var re_alltheshitz = regexp.MustCompile(`([` + bigboldshitz + lilboldshitz + biggothshitz + lilgothshitz + + moegothshitz + morgothshitz + bigitalshitz + lilitalshitz + bigbangshitz + lilbangshitz + bigblokshitz + - "][ \ufe0f]?){3,}") + "][ '\ufe0f]?){3,}") // this may not be especially fast func unpucker(s string) string {@@ -47,11 +50,11 @@ xi := 0
loop1: for _, c := range r { xi++ - if c == ' ' { - x[xi] = ' ' + if c == ' ' || c == '\'' { + x[xi] = byte(c) continue } - for _, set := range []string{bigboldshitz, biggothshitz, bigitalshitz, bigbangshitz, bigblokshitz} { + for _, set := range []string{bigboldshitz, biggothshitz, moegothshitz, bigitalshitz, bigbangshitz, bigblokshitz} { i := 0 for _, rr := range set { if rr == c {@@ -61,7 +64,7 @@ }
i++ } } - for _, set := range []string{lilboldshitz, lilgothshitz, lilitalshitz, lilbangshitz} { + for _, set := range []string{lilboldshitz, lilgothshitz, morgothshitz, lilitalshitz, lilbangshitz} { i := 0 for _, rr := range set { if rr == c {