also match crazy words with spaces embedded
This commit is contained in:
parent
99c41825ed
commit
0f329cfea1
|
@ -30,12 +30,12 @@ var lilitalshitz = "𝒂𝒃𝒄𝒅𝒆𝒇𝒈𝒉𝒊𝒋𝒌𝒍𝒎𝒏𝒐
|
||||||
var bigbangshitz = "𝔸𝔹ℂ𝔻𝔼𝔽𝔾ℍ𝕀𝕁𝕂𝕃𝕄ℕ𝕆ℙℚℝ𝕊𝕋𝕌𝕍𝕎𝕏𝕐ℤ"
|
var bigbangshitz = "𝔸𝔹ℂ𝔻𝔼𝔽𝔾ℍ𝕀𝕁𝕂𝕃𝕄ℕ𝕆ℙℚℝ𝕊𝕋𝕌𝕍𝕎𝕏𝕐ℤ"
|
||||||
var lilbangshitz = "𝕒𝕓𝕔𝕕𝕖𝕗𝕘𝕙𝕚𝕛𝕜𝕝𝕞𝕟𝕠𝕡𝕢𝕣𝕤𝕥𝕦𝕧𝕨𝕩𝕪𝕫"
|
var lilbangshitz = "𝕒𝕓𝕔𝕕𝕖𝕗𝕘𝕙𝕚𝕛𝕜𝕝𝕞𝕟𝕠𝕡𝕢𝕣𝕤𝕥𝕦𝕧𝕨𝕩𝕪𝕫"
|
||||||
|
|
||||||
var re_alltheshitz = regexp.MustCompile(`[` +
|
var re_alltheshitz = regexp.MustCompile(`([` +
|
||||||
bigboldshitz + lilboldshitz +
|
bigboldshitz + lilboldshitz +
|
||||||
biggothshitz + lilgothshitz +
|
biggothshitz + lilgothshitz +
|
||||||
bigitalshitz + lilitalshitz +
|
bigitalshitz + lilitalshitz +
|
||||||
bigbangshitz + lilbangshitz +
|
bigbangshitz + lilbangshitz +
|
||||||
`]{2,}`)
|
`] ?){3,}`)
|
||||||
|
|
||||||
// this may not be especially fast
|
// this may not be especially fast
|
||||||
func unpucker(s string) string {
|
func unpucker(s string) string {
|
||||||
|
@ -45,6 +45,10 @@ func unpucker(s string) string {
|
||||||
loop1:
|
loop1:
|
||||||
for _, c := range r {
|
for _, c := range r {
|
||||||
xi++
|
xi++
|
||||||
|
if c == ' ' {
|
||||||
|
x[xi] = ' '
|
||||||
|
continue
|
||||||
|
}
|
||||||
for _, set := range []string{bigboldshitz, biggothshitz, bigitalshitz, bigbangshitz} {
|
for _, set := range []string{bigboldshitz, biggothshitz, bigitalshitz, bigbangshitz} {
|
||||||
i := 0
|
i := 0
|
||||||
for _, rr := range set {
|
for _, rr := range set {
|
||||||
|
|
Loading…
Reference in New Issue