postcss-values-parser
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -47,3 +47,4 @@ 'use strict'; | ||
escaped = void 0, | ||
escapePos = void 0; | ||
escapePos = void 0, | ||
nextChar = void 0; | ||
@@ -89,11 +90,2 @@ var length = css.length; | ||
case plus: | ||
case minus: | ||
case asterisk: | ||
next = pos + 1; | ||
tokens.push(['operator', css.slice(pos, next), line, pos - offset, line, next - offset, pos]); | ||
pos = next - 1; | ||
break; | ||
case colon: | ||
@@ -169,2 +161,24 @@ next = pos + 1; | ||
case plus: | ||
case minus: | ||
case asterisk: | ||
next = pos + 1; | ||
nextChar = css.slice(pos + 1, next + 1); | ||
// if the operator is immediately followed by a word character, then we | ||
// have a prefix of some kind, and should fall-through. eg. -webkit | ||
/* eslint no-fallthrough: 0 */ | ||
if (!/[a-z]/gi.test(nextChar)) { | ||
tokens.push(['operator', css.slice(pos, next), line, pos - offset, line, next - offset, pos]); | ||
pos = next - 1; | ||
break; | ||
} | ||
// NOTE: This is the only case that should fall-through. If we run into | ||
// another situation where we need fall-through, then we need to break | ||
// this select out into functions. | ||
default: | ||
@@ -171,0 +185,0 @@ if (code === slash && css.charCodeAt(pos + 1) === asterisk) { |
{ | ||
"name": "postcss-values-parser", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "A CSS property value parser for use with PostCSS", | ||
@@ -5,0 +5,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68272
1353