postcss-values-parser
Advanced tools
Comparing version
@@ -17,3 +17,3 @@ /* | ||
const allFunctions = [ | ||
const cssFunctions = [ | ||
'annotation', | ||
@@ -89,3 +89,3 @@ 'attr', | ||
const vendorPrefixes = ['-webkit-', '-moz-', '-ms-', '-o-']; | ||
const reFunctions = new RegExp(`^(${vendorPrefixes.join('|')})?(${allFunctions.join('|')})`, 'i'); | ||
const reFunctions = new RegExp(`^(${vendorPrefixes.join('|')})?(${cssFunctions.join('|')})`, 'i'); | ||
const rePunctuation = new RegExp(`^(\\${Punctuation.chars.join('|\\')})`); | ||
@@ -127,3 +127,4 @@ const reColorFunctions = /^(hsla?|hwb|lab|lch|rgba?)$/i; | ||
// fixes #92 | ||
if (!reFunctions.test(node.name) && !/^[a-zA-Z]+$/.test(node.name)) { | ||
// eslint-disable-next-line no-useless-escape | ||
if (!reFunctions.test(node.name) && !/^[a-zA-Z\-]+$/.test(node.name)) { | ||
const nameTokens = getTokens(node.name); | ||
@@ -130,0 +131,0 @@ tokens.unshift(...nameTokens, brackets); |
{ | ||
"name": "postcss-values-parser", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "A CSS property value parser for use with PostCSS", | ||
@@ -5,0 +5,0 @@ "license": "MPL-2.0", |
62462
0.08%1256
0.08%