mirror of
https://github.com/thelounge/thelounge.git
synced 2024-05-17 21:56:36 +02:00
6 lines
267 B
TypeScript
6 lines
267 B
TypeScript
const matchFormatting =
|
|
// eslint-disable-next-line no-control-regex
|
|
/\x02|\x1D|\x1F|\x16|\x0F|\x11|\x1E|\x03(?:[0-9]{1,2}(?:,[0-9]{1,2})?)?|\x04(?:[0-9a-f]{6}(?:,[0-9a-f]{6})?)?/gi;
|
|
|
|
export default (message: string) => message.replace(matchFormatting, "").trim();
|