(node, name, isFragment)
| 107 | } |
| 108 | |
| 109 | function processChildren(node, name, isFragment) { |
| 110 | const children = t.react.buildChildren(node); |
| 111 | if (children && children.length !== 0) { |
| 112 | if (!isFragment) { |
| 113 | raw('>'); |
| 114 | } |
| 115 | for (let i = 0; i < children.length; i++) { |
| 116 | let child = children[i]; |
| 117 | if (t.isStringLiteral(child)) { |
| 118 | escapeText(child.value); |
| 119 | } |
| 120 | else if (t.isJSXElement(child)) { |
| 121 | processNode(child); |
| 122 | } |
| 123 | else { |
| 124 | expr(child); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | if (!isFragment) { |
| 129 | if (isComponentName(name)) { |
| 130 | if (terse) { |
| 131 | raw('<//>'); |
| 132 | } |
| 133 | else { |
| 134 | raw('</'); |
| 135 | expr(name); |
| 136 | raw('>'); |
| 137 | } |
| 138 | } |
| 139 | else { |
| 140 | raw('</'); |
| 141 | raw(name.name); |
| 142 | raw('>'); |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | else if (!isFragment) { |
| 147 | raw('/>'); |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | function processNode(node, path, isRoot) { |
| 152 | const open = node.openingElement; |
no test coverage detected
searching dependent graphs…