MCPcopy
hub / github.com/postcss/postcss / rawIndent

Method rawIndent

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

Source from the content-addressed store, hash-verified

302 }
303
304 rawIndent(root) {
305 if (root.raws.indent) return root.raws.indent
306 let value
307 root.walk(i => {
308 let p = i.parent
309 if (p && p !== root && p.parent && p.parent === root) {
310 if (typeof i.raws.before !== 'undefined') {
311 let parts = i.raws.before.split('\n')
312 value = parts[parts.length - 1]
313 value = value.replace(/\S/g, '')
314 return false
315 }
316 }
317 })
318 return value
319 }
320
321 rawSemicolon(root) {
322 let value

Callers

nothing calls this directly

Calls 1

walkMethod · 0.80

Tested by

no test coverage detected