Skip to content

Commit

Permalink
chore(helpers): improve validateFilterRE regex (#1503)
Browse files Browse the repository at this point in the history
* chore(helpers): improve validateFilterRE regex

* Update packages/core/src/utils/helpers.ts

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
sudongyuer and antfu committed Sep 2, 2022
1 parent 2044290 commit 3322f43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { ParsedUtil, RawUtil, StringifiedUtil, Variant, VariantObject } fro

export const attributifyRE = /^\[(.+?)~?="(.*)"\]$/
export const cssIdRE = /\.(css|postcss|sass|scss|less|stylus|styl)$/
export const validateFilterRE = /(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-?]/
export const validateFilterRE = /[\w\u00A0-\uFFFF-_:%-?]/
export const CONTROL_SHORTCUT_NO_MERGE = '$$shortcut-no-merge'

export function isAttributifySelector(selector: string) {
Expand Down

0 comments on commit 3322f43

Please sign in to comment.