From 8d9458fadaecb52dd2047728d63d12b4b64da802 Mon Sep 17 00:00:00 2001 From: moscovium Date: Sat, 3 Jun 2017 08:35:45 +0200 Subject: [PATCH] chat: fix messages like ^35121.0^7 showing as .0 This happens because Quake colors are meant to be only a single character, yet the regular expression uses the `+` operator. --- resources/[system]/chat/html/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/[system]/chat/html/Message.js b/resources/[system]/chat/html/Message.js index 52c0a4a..bc8ac07 100644 --- a/resources/[system]/chat/html/Message.js +++ b/resources/[system]/chat/html/Message.js @@ -29,7 +29,7 @@ Vue.component('message', { return `${str}` }, colorize(str) { - let s = "" + (str.replace(/\^([0-9]+)/g, (str, color) => ``)) + ""; + let s = "" + (str.replace(/\^([0-9])/g, (str, color) => ``)) + ""; const styleDict = { '*': 'font-weight: bold;',