Skip to content

Commit f294556

Browse files
author
Onimock
committed
Fix: QSS parser to handle hyphenated pseudo-elements correctly
1 parent a56168d commit f294556

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qss_parser/qss_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Constants:
4343
COMPILED_ATTRIBUTE_PATTERN: Final[Pattern[str]] = re.compile(ATTRIBUTE_PATTERN)
4444
VARIABLE_PATTERN: Final[str] = r"var\((--[\w-]+)\)"
4545
COMPLETE_RULE_PATTERN: Final[str] = r"^\s*[^/][^{}]*\s*\{[^}]*\}\s*$"
46-
PSEUDO_PATTERN: Final[str] = r"(\w+|#[-\w]+|\[.*?\])\s*(:{1,2})\s*(\w+)"
46+
PSEUDO_PATTERN: Final[str] = r"(\w+|#[-\w]+|\[.*?\])\s*(:{1,2})\s*([-\w]+)"
4747
CLASS_ID_PATTERN: Final[str] = r"(\w+)(#[-\w]+)"
4848
COMBINATOR_PATTERN: Final[str] = (
4949
r"(\w+|#[-\w]+|\[.*?\])([> ]{1,2})(\w+|#[-\w]+|\[.*?\])"

0 commit comments

Comments
 (0)