summaryrefslogtreecommitdiff
path: root/node_modules/postcss/lib/map-generator.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/postcss/lib/map-generator.js')
-rw-r--r--node_modules/postcss/lib/map-generator.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/node_modules/postcss/lib/map-generator.js b/node_modules/postcss/lib/map-generator.js
index 523b4639..b5da1642 100644
--- a/node_modules/postcss/lib/map-generator.js
+++ b/node_modules/postcss/lib/map-generator.js
@@ -16,6 +16,7 @@ class MapGenerator {
this.root = root
this.opts = opts
this.css = cssString
+ this.originalCSS = cssString
this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute
this.memoizedFileURLs = new Map()
@@ -74,7 +75,7 @@ class MapGenerator {
}
}
} else if (this.css) {
- this.css = this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm, '')
+ this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, '')
}
}
@@ -276,7 +277,7 @@ class MapGenerator {
}
})
} else {
- let input = new Input(this.css, this.opts)
+ let input = new Input(this.originalCSS, this.opts)
if (input.map) this.previousMaps.push(input.map)
}
}