postcss 8.5.12 → 8.5.13
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.
- package/lib/lazy-result.js +4 -1
- package/lib/processor.js +1 -1
- package/lib/stringifier.js +23 -22
- package/package.json +1 -1
package/lib/lazy-result.js
CHANGED
|
@@ -379,7 +379,10 @@ class LazyResult {
|
|
|
379
379
|
if (str.stringify) str = str.stringify
|
|
380
380
|
|
|
381
381
|
let rootSource = this.result.root.source
|
|
382
|
-
if (
|
|
382
|
+
if (
|
|
383
|
+
opts.map === undefined &&
|
|
384
|
+
!(rootSource && rootSource.input && rootSource.input.map)
|
|
385
|
+
) {
|
|
383
386
|
let result = ''
|
|
384
387
|
str(this.result.root, i => {
|
|
385
388
|
result += i
|
package/lib/processor.js
CHANGED
package/lib/stringifier.js
CHANGED
|
@@ -86,21 +86,22 @@ class Stringifier {
|
|
|
86
86
|
|
|
87
87
|
block(node, start) {
|
|
88
88
|
let raws = node.raws
|
|
89
|
-
let between =
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
let between =
|
|
90
|
+
typeof raws.between !== 'undefined'
|
|
91
|
+
? raws.between
|
|
92
|
+
: this.raw(node, 'between', 'beforeOpen')
|
|
92
93
|
this.builder(escapeHTMLInCSS(start + between) + '{', node, 'start')
|
|
93
94
|
|
|
94
95
|
let after
|
|
95
96
|
if (node.nodes && node.nodes.length) {
|
|
96
97
|
this.body(node)
|
|
97
|
-
after =
|
|
98
|
-
? raws.after
|
|
99
|
-
: this.raw(node, 'after')
|
|
98
|
+
after =
|
|
99
|
+
typeof raws.after !== 'undefined' ? raws.after : this.raw(node, 'after')
|
|
100
100
|
} else {
|
|
101
|
-
after =
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
after =
|
|
102
|
+
typeof raws.after !== 'undefined'
|
|
103
|
+
? raws.after
|
|
104
|
+
: this.raw(node, 'after', 'emptyBody')
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
if (after) this.builder(escapeHTMLInCSS(after))
|
|
@@ -130,25 +131,25 @@ class Stringifier {
|
|
|
130
131
|
|
|
131
132
|
comment(node) {
|
|
132
133
|
let raws = node.raws
|
|
133
|
-
let left =
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
134
|
+
let left =
|
|
135
|
+
typeof raws.left !== 'undefined'
|
|
136
|
+
? raws.left
|
|
137
|
+
: this.raw(node, 'left', 'commentLeft')
|
|
138
|
+
let right =
|
|
139
|
+
typeof raws.right !== 'undefined'
|
|
140
|
+
? raws.right
|
|
141
|
+
: this.raw(node, 'right', 'commentRight')
|
|
139
142
|
this.builder(escapeHTMLInCSS('/*' + left + node.text + right + '*/'), node)
|
|
140
143
|
}
|
|
141
144
|
|
|
142
145
|
decl(node, semicolon) {
|
|
143
146
|
let raws = node.raws
|
|
144
|
-
let between =
|
|
145
|
-
|
|
146
|
-
|
|
147
|
+
let between =
|
|
148
|
+
typeof raws.between !== 'undefined'
|
|
149
|
+
? raws.between
|
|
150
|
+
: this.raw(node, 'between', 'colon')
|
|
147
151
|
|
|
148
|
-
let
|
|
149
|
-
let value = rawVal && rawVal.value === node.value ? rawVal.raw : node.value
|
|
150
|
-
|
|
151
|
-
let string = node.prop + between + value
|
|
152
|
+
let string = node.prop + between + this.rawValue(node, 'value')
|
|
152
153
|
|
|
153
154
|
if (node.important) {
|
|
154
155
|
string += raws.important || ' !important'
|