Fix trimming characters on non-emote words

Don't trim anything from non-emote words when parsing emotes.
This commit is contained in:
Zorchenhimer 2019-03-30 15:40:21 -04:00
parent 67b3143893
commit 0ff872065f
1 changed files with 2 additions and 2 deletions

View File

@ -16,11 +16,11 @@ func ParseEmotesArray(words []string) []string {
newWords := []string{}
for _, word := range words {
// make :emote: and [emote] valid for replacement.
word = strings.Trim(word, ":[]")
wordTrimmed := strings.Trim(word, ":[]")
found := false
for key, val := range Emotes {
if key == word {
if key == wordTrimmed {
newWords = append(newWords, EmoteToHtml(val, key))
found = true
}