You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I add a regex special character to an exclusion word I don't want to deal with the problem of regex-escaping them because is really confusing to add escaping characters to YAML. Additionally, the documentation of the action is not referrencing that exclusion words are regexes, it refers to them as "keywords".
Current Behavior
When I add a regex special character to an exclusion, the action raises a Syntax error. I can reproduce it locally with, for example:
>'icon\nrequest\n[\n]'.split(/[\s\n]+/).map((keyword)=>keyword.trim()).filter((keyword)=>keyword.length>0).reduce((memo,keyword)=>memo.replace(newRegExp(keyword,'igm'),''),'[icon request] hello world')UncaughtSyntaxError: Invalidregularexpression: /[/: Unterminated character class
Possible Solution
Regex-escaping exclude keywords with a function like this:
Expected Behavior
When I add a regex special character to an exclusion word I don't want to deal with the problem of regex-escaping them because is really confusing to add escaping characters to YAML. Additionally, the documentation of the action is not referrencing that exclusion words are regexes, it refers to them as "keywords".
Current Behavior
When I add a regex special character to an exclusion, the action raises a Syntax error. I can reproduce it locally with, for example:
Possible Solution
Regex-escaping
exclude
keywords with a function like this:Other solution would be to define
exclude
keywords as regexes in the documentation and provide an example of regex-escaping them.The text was updated successfully, but these errors were encountered: