another day, another cursed character set

This commit is contained in:
Ted Unangst 2019-05-21 19:01:53 -04:00
parent d8d439e596
commit 1d97b24c82
1 changed files with 5 additions and 2 deletions

View File

@ -31,6 +31,8 @@ var bigitalshitz = "𝑨𝑩𝑪𝑫𝑬𝑭𝑮𝑯𝑰𝑱𝑲𝑳𝑴𝑵𝑶
var lilitalshitz = "𝒂𝒃𝒄𝒅𝒆𝒇𝒈𝒉𝒊𝒋𝒌𝒍𝒎𝒏𝒐𝒑𝒒𝒓𝒔𝒕𝒖𝒗𝒘𝒙𝒚𝒛" var lilitalshitz = "𝒂𝒃𝒄𝒅𝒆𝒇𝒈𝒉𝒊𝒋𝒌𝒍𝒎𝒏𝒐𝒑𝒒𝒓𝒔𝒕𝒖𝒗𝒘𝒙𝒚𝒛"
var bigbangshitz = "𝔸𝔹𝔻𝔼𝔽𝔾𝕀𝕁𝕂𝕃𝕄𝕆𝕊𝕋𝕌𝕍𝕎𝕏𝕐" var bigbangshitz = "𝔸𝔹𝔻𝔼𝔽𝔾𝕀𝕁𝕂𝕃𝕄𝕆𝕊𝕋𝕌𝕍𝕎𝕏𝕐"
var lilbangshitz = "𝕒𝕓𝕔𝕕𝕖𝕗𝕘𝕙𝕚𝕛𝕜𝕝𝕞𝕟𝕠𝕡𝕢𝕣𝕤𝕥𝕦𝕧𝕨𝕩𝕪𝕫" var lilbangshitz = "𝕒𝕓𝕔𝕕𝕖𝕗𝕘𝕙𝕚𝕛𝕜𝕝𝕞𝕟𝕠𝕡𝕢𝕣𝕤𝕥𝕦𝕧𝕨𝕩𝕪𝕫"
var bigwideshitz = ""
var lilwideshitz = ""
var bigblokshitz = "🅰🅱🅲🅳🅴🅵🅶🅷🅸🅹🅺🅻🅼🅽🅾🅿🆀🆁🆂🆃🆄🆅🆆🆇🆈🆉" var bigblokshitz = "🅰🅱🅲🅳🅴🅵🅶🅷🅸🅹🅺🅻🅼🅽🅾🅿🆀🆁🆂🆃🆄🆅🆆🆇🆈🆉"
var re_alltheshitz = regexp.MustCompile(`([` + var re_alltheshitz = regexp.MustCompile(`([` +
@ -39,6 +41,7 @@ var re_alltheshitz = regexp.MustCompile(`([` +
moegothshitz + morgothshitz + moegothshitz + morgothshitz +
bigitalshitz + lilitalshitz + bigitalshitz + lilitalshitz +
bigbangshitz + lilbangshitz + bigbangshitz + lilbangshitz +
bigwideshitz + lilwideshitz +
bigblokshitz + bigblokshitz +
"][ '\ufe0f]?){3,}") "][ '\ufe0f]?){3,}")
@ -56,7 +59,7 @@ func unpucker(s string) string {
x[xi] = byte(c) x[xi] = byte(c)
continue continue
} }
for _, set := range []string{bigboldshitz, biggothshitz, moegothshitz, bigitalshitz, bigbangshitz, bigblokshitz} { for _, set := range []string{bigboldshitz, biggothshitz, bigwideshitz, moegothshitz, bigitalshitz, bigbangshitz, bigblokshitz} {
i := 0 i := 0
for _, rr := range set { for _, rr := range set {
if rr == c { if rr == c {
@ -66,7 +69,7 @@ func unpucker(s string) string {
i++ i++
} }
} }
for _, set := range []string{lilboldshitz, lilgothshitz, morgothshitz, lilitalshitz, lilbangshitz} { for _, set := range []string{lilboldshitz, lilgothshitz, lilwideshitz, morgothshitz, lilitalshitz, lilbangshitz} {
i := 0 i := 0
for _, rr := range set { for _, rr := range set {
if rr == c { if rr == c {