Updated regex
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2022-11-25 11:13:26 +01:00
parent 7ea4d9c2e1
commit 6af7da4793
1 changed files with 2 additions and 2 deletions

View File

@ -11,9 +11,9 @@ module.exports = Self => {
let {message} = ctx.instance;
if (!message) return;
const parts = message.match(/(?<=\[).*(?=])/g);
const parts = message.match(/(?<=\[)[a-zA-Z0-9!@#$%^&*()={};':"\\|,.<>/?\s]*(?=])/g);
const replacedParts = parts.map(part => {
return part.replace(/[*()]/g, '');
return part.replace(/[!@#$%^&*()={};':"\\|,.<>/?]/g, '');
});
for (const [index, part] of parts.entries())