* Compile a node list and return a childLinkFn. * * @param {NodeList} nodeList * @param {Object} options * @return {Function|undefined}
(nodeList, options)
| 7272 | */ |
| 7273 | |
| 7274 | function compileNodeList(nodeList, options) { |
| 7275 | var linkFns = []; |
| 7276 | var nodeLinkFn, childLinkFn, node; |
| 7277 | for (var i = 0, l = nodeList.length; i < l; i++) { |
| 7278 | node = nodeList[i]; |
| 7279 | nodeLinkFn = compileNode(node, options); |
| 7280 | childLinkFn = !(nodeLinkFn && nodeLinkFn.terminal) && node.tagName !== 'SCRIPT' && node.hasChildNodes() ? compileNodeList(node.childNodes, options) : null; |
| 7281 | linkFns.push(nodeLinkFn, childLinkFn); |
| 7282 | } |
| 7283 | return linkFns.length ? makeChildLinkFn(linkFns) : null; |
| 7284 | } |
| 7285 | |
| 7286 | /** |
| 7287 | * Make a child link function for a node's childNodes. |
no test coverage detected