Skip to content

Commit dba521e

Browse files
committed
fix(rule-utils): escape rule prefix
close Group descendant selectors and prefixes Fixes #5004
1 parent 5d381da commit dba521e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages-presets/rule-utils/src/pseudo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ export function createTaggedPseudoClasses<T extends object = object>(
376376
): VariantObject<T>[] {
377377
const attributify = !!options?.attributifyPseudo
378378
let firstPrefix = options?.prefix ?? ''
379-
firstPrefix = (Array.isArray(firstPrefix) ? firstPrefix : [firstPrefix]).filter(Boolean)[0] ?? ''
379+
firstPrefix = escapeSelector((Array.isArray(firstPrefix) ? firstPrefix : [firstPrefix]).filter(Boolean)[0] ?? '')
380380
const tagWithPrefix = (tag: string, combinator: string) => createTaggedPseudoClassMatcher<T>(tag, attributify ? `[${firstPrefix}${tag}=""]` : `.${firstPrefix}${tag}`, combinator, utils)
381381

382382
return [

0 commit comments

Comments
 (0)