postcss-discard-comments
Advanced tools
+2
-2
| { | ||
| "name": "postcss-discard-comments", | ||
| "version": "7.0.5", | ||
| "version": "7.0.6", | ||
| "description": "Discard comments in your CSS files with PostCSS.", | ||
@@ -27,3 +27,3 @@ "main": "src/index.js", | ||
| "dependencies": { | ||
| "postcss-selector-parser": "^7.1.0" | ||
| "postcss-selector-parser": "^7.1.1" | ||
| }, | ||
@@ -30,0 +30,0 @@ "bugs": { |
@@ -23,11 +23,11 @@ 'use strict'; | ||
| let pos = 0; | ||
| let state = STATES.NORMAL; | ||
| let tokenStart = 0; | ||
| let commentStart = 0; | ||
| while (pos < length) { | ||
| const char = input[pos]; | ||
| const nextChar = pos + 1 < length ? input[pos + 1] : ''; | ||
| switch (state) { | ||
@@ -50,3 +50,3 @@ case STATES.NORMAL: | ||
| break; | ||
| case STATES.IN_SINGLE_QUOTE: | ||
@@ -61,3 +61,3 @@ if (char === '\\' && nextChar) { | ||
| break; | ||
| case STATES.IN_DOUBLE_QUOTE: | ||
@@ -72,3 +72,3 @@ if (char === '\\' && nextChar) { | ||
| break; | ||
| case STATES.IN_COMMENT: | ||
@@ -85,6 +85,6 @@ if (char === '*' && nextChar === '/') { | ||
| } | ||
| pos++; | ||
| } | ||
| // Handle remaining content | ||
@@ -98,4 +98,4 @@ if (state === STATES.IN_COMMENT) { | ||
| } | ||
| return tokens; | ||
| }; |
15952
-0.25%