MCPcopy
hub / github.com/postcss/postcss / body

Method body

lib/stringifier.js:103–119  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

101 }
102
103 body(node) {
104 let nodes = node.nodes
105 let last = nodes.length - 1
106 while (last > 0) {
107 if (nodes[last].type !== 'comment') break
108 last -= 1
109 }
110
111 let semicolon = this.raw(node, 'semicolon')
112 let isDocument = node.type === 'document'
113 for (let i = 0; i < nodes.length; i++) {
114 let child = nodes[i]
115 let before = this.raw(child, 'before')
116 if (before) this.builder(isDocument ? before : escapeHTMLInCSS(before))
117 this.stringify(child, last !== i || semicolon)
118 }
119 }
120
121 comment(node) {
122 let left = this.raw(node, 'left', 'commentLeft')

Callers 3

blockMethod · 0.95
documentMethod · 0.95
rootMethod · 0.95

Calls 3

rawMethod · 0.95
stringifyMethod · 0.95
escapeHTMLInCSSFunction · 0.85

Tested by

no test coverage detected