* 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)
| 5703 | * @returns {*} |
| 5704 | */ |
| 5705 | function groupScan(node, attrStart, attrEnd) { |
| 5706 | var nodes = []; |
| 5707 | var depth = 0; |
| 5708 | if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) { |
| 5709 | var startNode = node; |
| 5710 | do { |
| 5711 | if (!node) { |
| 5712 | throw $compileMinErr('uterdir', |
| 5713 | "Unterminated attribute, found '{0}' but no matching '{1}' found.", |
| 5714 | attrStart, attrEnd); |
| 5715 | } |
| 5716 | if (node.nodeType == 1 /** Element **/) { |
| 5717 | if (node.hasAttribute(attrStart)) depth++; |
| 5718 | if (node.hasAttribute(attrEnd)) depth--; |
| 5719 | } |
| 5720 | nodes.push(node); |
| 5721 | node = node.nextSibling; |
| 5722 | } while (depth > 0); |
| 5723 | } else { |
| 5724 | nodes.push(node); |
| 5725 | } |
| 5726 | |
| 5727 | return jqLite(nodes); |
| 5728 | } |
| 5729 | |
| 5730 | /** |
| 5731 | * Wrapper for linking function which converts normal linking function into a grouped |
no test coverage detected
searching dependent graphs…