* Given a node with an directive-start it collects all of the siblings until it finds * directive-end. * @param node * @param attrStart * @param attrEnd * @returns {*}
(node, attrStart, attrEnd)
| 6305 | * @returns {*} |
| 6306 | */ |
| 6307 | function groupScan(node, attrStart, attrEnd) { |
| 6308 | var nodes = []; |
| 6309 | var depth = 0; |
| 6310 | if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) { |
| 6311 | var startNode = node; |
| 6312 | do { |
| 6313 | if (!node) { |
| 6314 | throw $compileMinErr('uterdir', |
| 6315 | "Unterminated attribute, found '{0}' but no matching '{1}' found.", |
| 6316 | attrStart, attrEnd); |
| 6317 | } |
| 6318 | if (node.nodeType == 1 /** Element **/) { |
| 6319 | if (node.hasAttribute(attrStart)) depth++; |
| 6320 | if (node.hasAttribute(attrEnd)) depth--; |
| 6321 | } |
| 6322 | nodes.push(node); |
| 6323 | node = node.nextSibling; |
| 6324 | } while (depth > 0); |
| 6325 | } else { |
| 6326 | nodes.push(node); |
| 6327 | } |
| 6328 | |
| 6329 | return jqLite(nodes); |
| 6330 | } |
| 6331 | |
| 6332 | /** |
| 6333 | * Wrapper for linking function which converts normal linking function into a grouped |
no outgoing calls
no test coverage detected