mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 20:13:07 +00:00
Merge pull request #2534 from thelounge/mcinkay/unicode-custom-highlight
Fix word boundary in the custom highlights regex not matching unicode
This commit is contained in:
commit
011bf80038
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ function applySetting(name, value) {
|
|||
});
|
||||
|
||||
if (highlightsTokens && highlightsTokens.length) {
|
||||
module.exports.highlightsRE = new RegExp("\\b(?:" + highlightsTokens.join("|") + ")\\b", "i");
|
||||
module.exports.highlightsRE = new RegExp(`(?:^| |\t)(?:${highlightsTokens.join("|")})(?:\t| |$)`, "i");
|
||||
} else {
|
||||
module.exports.highlightsRE = null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue