clapping is fucking obnoxious

This commit is contained in:
Ted Unangst 2019-05-17 16:11:40 -04:00
parent 5fb2e9c0a5
commit 32782d5356
1 changed files with 4 additions and 0 deletions

View File

@ -42,6 +42,8 @@ var re_alltheshitz = regexp.MustCompile(`([` +
bigblokshitz + bigblokshitz +
"][ '\ufe0f]?){3,}") "][ '\ufe0f]?){3,}")
var re_moredumb = regexp.MustCompile(`[👏]`)
// this may not be especially fast // this may not be especially fast
func unpucker(s string) string { func unpucker(s string) string {
fixer := func(r string) string { fixer := func(r string) string {
@ -80,6 +82,8 @@ func unpucker(s string) string {
} }
s = re_alltheshitz.ReplaceAllStringFunc(s, fixer) s = re_alltheshitz.ReplaceAllStringFunc(s, fixer)
s = re_moredumb.ReplaceAllString(s, ".")
zw := false zw := false
for _, c := range s { for _, c := range s {
if runewidth.RuneWidth(c) == 0 { if runewidth.RuneWidth(c) == 0 {