MCPcopy
hub / github.com/postcss/postcss / rawBeforeClose

Method rawBeforeClose

lib/stringifier.js:199–214  ·  view source on GitHub ↗
(root)

Source from the content-addressed store, hash-verified

197 }
198
199 rawBeforeClose(root) {
200 let value
201 root.walk(i => {
202 if (i.nodes && i.nodes.length > 0) {
203 if (typeof i.raws.after !== 'undefined') {
204 value = i.raws.after
205 if (value.includes('\n')) {
206 value = value.replace(/[^\n]+$/, '')
207 }
208 return false
209 }
210 }
211 })
212 if (value) value = value.replace(/\S/g, '')
213 return value
214 }
215
216 rawBeforeComment(root, node) {
217 let value

Callers

nothing calls this directly

Calls 1

walkMethod · 0.80

Tested by

no test coverage detected