summaryrefslogtreecommitdiff
path: root/node_modules/clean-css/lib/optimizer/level-1/tidy-block.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/clean-css/lib/optimizer/level-1/tidy-block.js')
-rw-r--r--node_modules/clean-css/lib/optimizer/level-1/tidy-block.js34
1 files changed, 0 insertions, 34 deletions
diff --git a/node_modules/clean-css/lib/optimizer/level-1/tidy-block.js b/node_modules/clean-css/lib/optimizer/level-1/tidy-block.js
deleted file mode 100644
index 0cbbd99f..00000000
--- a/node_modules/clean-css/lib/optimizer/level-1/tidy-block.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var SUPPORTED_COMPACT_BLOCK_MATCHER = /^@media\W/;
-var SUPPORTED_QUOTE_REMOVAL_MATCHER = /^@(?:keyframes|-moz-keyframes|-o-keyframes|-webkit-keyframes)\W/;
-
-function tidyBlock(values, spaceAfterClosingBrace) {
- var withoutSpaceAfterClosingBrace;
- var withoutQuotes;
- var i;
-
- for (i = values.length - 1; i >= 0; i--) {
- withoutSpaceAfterClosingBrace = !spaceAfterClosingBrace && SUPPORTED_COMPACT_BLOCK_MATCHER.test(values[i][1]);
- withoutQuotes = SUPPORTED_QUOTE_REMOVAL_MATCHER.test(values[i][1]);
-
- values[i][1] = values[i][1]
- .replace(/\n|\r\n/g, ' ')
- .replace(/\s+/g, ' ')
- .replace(/(,|:|\() /g, '$1')
- .replace(/ \)/g, ')');
-
- if (withoutQuotes) {
- values[i][1] = values[i][1]
- .replace(/'([a-zA-Z][a-zA-Z\d\-_]+)'/, '$1')
- .replace(/"([a-zA-Z][a-zA-Z\d\-_]+)"/, '$1');
- }
-
- if (withoutSpaceAfterClosingBrace) {
- values[i][1] = values[i][1]
- .replace(/\) /g, ')');
- }
- }
-
- return values;
-}
-
-module.exports = tidyBlock;