single-file-core 1.5.55 → 1.5.56
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.
|
@@ -417,8 +417,12 @@ function collectDeclarationItemsForElement(element, docContext) {
|
|
|
417
417
|
const { type, value } = declaration.data;
|
|
418
418
|
if (type === DECLARATION_TYPE && value) {
|
|
419
419
|
const isRawValue = value.type === RAW_TYPE;
|
|
420
|
-
const
|
|
421
|
-
|
|
420
|
+
const isSingleValue = value.type === VALUE_TYPE &&
|
|
421
|
+
hasChildNodes(value) &&
|
|
422
|
+
value.children.length == 1 &&
|
|
423
|
+
value.children.head.data.name;
|
|
424
|
+
const isVendorValue = isSingleValue && value.children.head.data.name.startsWith(VENDOR_PREFIX);
|
|
425
|
+
const isInvalidValue = isSingleValue && INVALID_CSS_ESCAPE_TEST.test(value.children.head.data.name);
|
|
422
426
|
if (!isRawValue && !isVendorValue && !isInvalidValue) {
|
|
423
427
|
allDeclarations.push({
|
|
424
428
|
declaration,
|