single-file-core 1.5.80 → 1.5.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -94,7 +94,7 @@ function sanitizeSelector(selector, ancestors, docContext) {
|
|
|
94
94
|
if (docContext.normalizedSelectorText.has(selector)) {
|
|
95
95
|
return docContext.normalizedSelectorText.get(selector);
|
|
96
96
|
}
|
|
97
|
-
const ast = cssTree.
|
|
97
|
+
const ast = cssTree.parse(cssTree.generate(selector.data), { context: "selectorList" });
|
|
98
98
|
normalizeSelectorNode(ast, ancestors);
|
|
99
99
|
let normalized = cssTree.generate(ast);
|
|
100
100
|
if (!normalized || !normalized.trim()) {
|
|
@@ -132,6 +132,8 @@ function normalizeSelectorNode(selector, ancestors) {
|
|
|
132
132
|
if (DYNAMIC_STATE_PSEUDO_CLASSES.includes(pseudoName)) {
|
|
133
133
|
selector.children.remove(current);
|
|
134
134
|
}
|
|
135
|
+
} else if (childNode.type === "Selector") {
|
|
136
|
+
normalizeSelectorNode(childNode, ancestors);
|
|
135
137
|
}
|
|
136
138
|
current = next;
|
|
137
139
|
}
|