mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 22:10:22 +00:00
Make regex in cleanIrcMessage const
This commit is contained in:
parent
28b084af69
commit
c053011611
1 changed files with 3 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = (message) => message.replace(/\x02|\x1D|\x1F|\x16|\x0F|\x03(?:[0-9]{1,2}(?:,[0-9]{1,2})?)?|\x04(?:[0-9a-f]{6}(?:,[0-9a-f]{6})?)?/gi, "").trim();
|
||||
const matchFormatting = /\x02|\x1D|\x1F|\x16|\x0F|\x03(?:[0-9]{1,2}(?:,[0-9]{1,2})?)?|\x04(?:[0-9a-f]{6}(?:,[0-9a-f]{6})?)?/gi;
|
||||
|
||||
module.exports = (message) => message.replace(matchFormatting, "").trim();
|
||||
|
|
Loading…
Reference in a new issue