From 9769f023c5f443cdd651e08723029a104a480976 Mon Sep 17 00:00:00 2001 From: Jay2k1 Date: Tue, 19 Feb 2019 15:19:45 +0100 Subject: [PATCH] extend custom highlight regex --- src/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.js b/src/client.js index b80793c5..4887892c 100644 --- a/src/client.js +++ b/src/client.js @@ -401,7 +401,7 @@ Client.prototype.compileCustomHighlights = function() { return; } - client.highlightRegex = new RegExp(`(?:^| |\t)(?:${highlightsTokens.join("|")})(?:\t| |$)`, "i"); + client.highlightRegex = new RegExp(`(?:^|[ .,+!?|/:<>(){}'"@&~-])(?:${highlightsTokens.join("|")})(?:$|[ .,+!?|/:<>(){}'"-])`, "i"); }; Client.prototype.more = function(data) {