about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-04-03 03:03:52 -0400
committerBen Morrison <ben@gbmor.dev>2020-04-03 03:03:52 -0400
commit28a165f1caaa71c3ec06bb8756a622dddbddf5bc (patch)
treea0d26c6ba3ca6c69420912b194371de1aad1a56c
parentc8c80becf658693e4d5b4979c988e47beb9f5e11 (diff)
downloadgoofbot-28a165f1caaa71c3ec06bb8756a622dddbddf5bc.tar.gz
not splitting usernames to insert zero-width space, but prepending usernames with it
-rw-r--r--main.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/main.go b/main.go
index e92dfb5..5b8e0fb 100644
--- a/main.go
+++ b/main.go
@@ -163,16 +163,13 @@ func main() {
 
 			split := strings.Split(bytestream.String(), "\n")
 			var out bytes.Buffer
+
 			for i := 1; i < len(split); i++ {
 				if split[i] == "" {
 					continue
 				}
 
-				tmp := split[i]
-				a := tmp[:2]
-				b := tmp[2:]
-				c := fmt.Sprintf("%s%s%s", a, ZWSP, b)
-
+				c := fmt.Sprintf("%s%s", ZWSP, split[i])
 				out.WriteString(c + " ")
 			}