From 16c36ca9bc60a242c28b2ed3d8e3434e716d3f24 Mon Sep 17 00:00:00 2001 From: Zorchenhimer Date: Mon, 27 Apr 2020 12:50:29 -0400 Subject: [PATCH] Don't wrap name highlights with colons Name suggestions would wrap a name in colons instead of just emotes. It looks like this may have still worked fine, but it wasn't the correct behavior. --- wasm/suggestions.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wasm/suggestions.go b/wasm/suggestions.go index f5586a0..dfea7e2 100644 --- a/wasm/suggestions.go +++ b/wasm/suggestions.go @@ -74,14 +74,16 @@ func processMessageKey(this js.Value, v []js.Value) interface{} { msg := global.Get("msg") val := msg.Get("value").String() newval := val[:startIdx] + wrap := string(suggestionEmote) if i := strings.LastIndex(newval, string(currentSugType)); i != -1 { var offset int if currentSugType == suggestionName { offset = 1 + wrap = "" } - newval = newval[:i+offset] + ":" + currentSug + ":" + newval = newval[:i+offset] + wrap + currentSug + wrap } endVal := val[startIdx:]