Files
LearnGO/go/pkg/mod/github.com/!twi!n/go-away@v1.6.13/replacements.go
T
2024-09-19 21:38:24 -04:00

36 lines
547 B
Go

package goaway
// DefaultCharacterReplacements is the mapping of all characters that are replaced by other characters before
// attempting to find a profanity.
var DefaultCharacterReplacements = map[rune]rune{
// Leetspeak
'0': 'o',
'1': 'i',
'3': 'e',
'4': 'a',
'5': 's',
'7': 'l',
'$': 's',
'!': 'i',
'+': 't',
'#': 'h',
'@': 'a',
'<': 'c',
// Special characters
'-': ' ',
'_': ' ',
'|': ' ',
'.': ' ',
',': ' ',
'(': ' ',
')': ' ',
'>': ' ',
'"': ' ',
'`': ' ',
'~': ' ',
'*': ' ',
'&': ' ',
'%': ' ',
'?': ' ',
}