* Given a node with a directive-start it collects all of the siblings until it finds * directive-end. * @param node * @param attrStart * @param attrEnd * @returns {*}
(node, attrStart, attrEnd)
| 9430 | * @returns {*} |
| 9431 | */ |
| 9432 | function groupScan(node, attrStart, attrEnd) { |
| 9433 | var nodes = []; |
| 9434 | var depth = 0; |
| 9435 | if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) { |
| 9436 | do { |
| 9437 | if (!node) { |
| 9438 | throw $compileMinErr('uterdir', |
| 9439 | 'Unterminated attribute, found \'{0}\' but no matching \'{1}\' found.', |
| 9440 | attrStart, attrEnd); |
| 9441 | } |
| 9442 | if (node.nodeType === NODE_TYPE_ELEMENT) { |
| 9443 | if (node.hasAttribute(attrStart)) depth++; |
| 9444 | if (node.hasAttribute(attrEnd)) depth--; |
| 9445 | } |
| 9446 | nodes.push(node); |
| 9447 | node = node.nextSibling; |
| 9448 | } while (depth > 0); |
| 9449 | } else { |
| 9450 | nodes.push(node); |
| 9451 | } |
| 9452 | |
| 9453 | return jqLite(nodes); |
| 9454 | } |
| 9455 | |
| 9456 | /** |
| 9457 | * Wrapper for linking function which converts normal linking function into a grouped |
no outgoing calls
no test coverage detected