MCPcopy Index your code
hub / github.com/postcss/postcss / rawBeforeRule

Method rawBeforeRule

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

Source from the content-addressed store, hash-verified

263 }
264
265 rawBeforeRule(root) {
266 let value
267 root.walk(i => {
268 if (i.nodes && (i.parent !== root || root.first !== i)) {
269 if (typeof i.raws.before !== 'undefined') {
270 value = i.raws.before
271 if (value.includes('\n')) {
272 value = value.replace(/[^\n]+$/, '')
273 }
274 return false
275 }
276 }
277 })
278 if (value) value = value.replace(/\S/g, '')
279 return value
280 }
281
282 rawColon(root) {
283 let value

Callers

nothing calls this directly

Calls 1

walkMethod · 0.80

Tested by

no test coverage detected