Fix trimming characters on non-emote words
Don't trim anything from non-emote words when parsing emotes.
This commit is contained in:
parent
67b3143893
commit
0ff872065f
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue