fix:Remove duplicates in character class

This commit is contained in:
soulsands
2023-04-08 21:07:48 +08:00
parent 181ddce887
commit a0ac603260
3 changed files with 11 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
"use strict"
"use strict";
function formatAttrForSearch(attr, searchWithValue) {
let searchStr = '';
@@ -28,7 +28,7 @@ function formatAttrForSearch(attr, searchWithValue) {
}
function formatValue(val) {
if (!/[^\w_]/.test(val)) {
if (!/[^\w]/.test(val)) {
return val;
}
else if (!val.includes('"')) {
@@ -47,4 +47,4 @@ function formatValue(val) {
module.exports = {
formatAttrForSearch
}
};