From 0f329cfea1c98b820ac4adb2bb47688225183a27 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 30 Apr 2019 18:04:18 -0400 Subject: [PATCH] also match crazy words with spaces embedded --- skulduggery.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/skulduggery.go b/skulduggery.go index d39f74f..45a9370 100644 --- a/skulduggery.go +++ b/skulduggery.go @@ -30,12 +30,12 @@ var lilitalshitz = "π’‚π’ƒπ’„π’…π’†π’‡π’ˆπ’‰π’Šπ’‹π’Œπ’π’Žπ’π’ var bigbangshitz = "π”Έπ”Ήβ„‚π”»π”Όπ”½π”Ύβ„π•€π•π•‚π•ƒπ•„β„•π•†β„™β„šβ„π•Šπ•‹π•Œπ•π•Žπ•π•β„€" var lilbangshitz = "π•’π•“π•”π••π•–π•—π•˜π•™π•šπ•›π•œπ•π•žπ•Ÿπ• π•‘π•’π•£π•€π•₯𝕦𝕧𝕨𝕩π•ͺ𝕫" -var re_alltheshitz = regexp.MustCompile(`[` + +var re_alltheshitz = regexp.MustCompile(`([` + bigboldshitz + lilboldshitz + biggothshitz + lilgothshitz + bigitalshitz + lilitalshitz + bigbangshitz + lilbangshitz + - `]{2,}`) + `] ?){3,}`) // this may not be especially fast func unpucker(s string) string { @@ -45,6 +45,10 @@ func unpucker(s string) string { loop1: for _, c := range r { xi++ + if c == ' ' { + x[xi] = ' ' + continue + } for _, set := range []string{bigboldshitz, biggothshitz, bigitalshitz, bigbangshitz} { i := 0 for _, rr := range set {