mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 12:33:07 +00:00
dd05ee3a65
Co-authored-by: Eric Nemchik <eric@nemchik.com> Co-authored-by: Pavel Djundik <xPaw@users.noreply.github.com>
4 lines
221 B
TypeScript
4 lines
221 B
TypeScript
const matchFormatting =
|
|
/\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();
|