postcss-discard-comments 5.1.0 → 5.1.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-discard-comments",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "Discard comments in your CSS files with PostCSS.",
5
5
  "main": "src/index.js",
6
6
  "types": "types/index.d.ts",
package/src/index.js CHANGED
@@ -44,7 +44,6 @@ function pluginCreator(opts = {}) {
44
44
  if (replacerCache.has(key)) {
45
45
  return replacerCache.get(key);
46
46
  }
47
-
48
47
  const parsed = commentParser(source).reduce((value, [type, start, end]) => {
49
48
  const contents = source.slice(start, end);
50
49
 
@@ -106,6 +105,8 @@ function pluginCreator(opts = {}) {
106
105
  const b = matchesComments(node.raws.important);
107
106
 
108
107
  node.raws.important = b.length ? node.raws.important : '!important';
108
+ } else {
109
+ node.value = replaceComments(node.value, list.space);
109
110
  }
110
111
 
111
112
  return;