We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5502a39 commit c620fbfCopy full SHA for c620fbf
src/rules/rules.js
@@ -222,7 +222,7 @@ function setEnabled (uid, isEnabled) {
222
* @throws {Error} an error if the rule with the passed in uid already exists and {@link RuleConfig.overwrite} is not `true`
223
*/
224
function JSRule (ruleConfig) {
225
- const ruleUID = ruleConfig.id || ruleConfig.name.replace(/[^\w]/g, '-') + '-' + randomUUID();
+ const ruleUID = ruleConfig.id.replace(/\W/g, '-') || ruleConfig.name.replace(/\W/g, '-') + '-' + randomUUID();
226
if (ruleConfig.overwrite === true) {
227
removeRule(ruleUID);
228
}
0 commit comments