* 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)
| 8379 | * @returns {*} |
| 8380 | */ |
| 8381 | function groupScan(node, attrStart, attrEnd) { |
| 8382 | var nodes = []; |
| 8383 | var depth = 0; |
| 8384 | if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) { |
| 8385 | do { |
| 8386 | if (!node) { |
| 8387 | throw $compileMinErr('uterdir', |
| 8388 | "Unterminated attribute, found '{0}' but no matching '{1}' found.", |
| 8389 | attrStart, attrEnd); |
| 8390 | } |
| 8391 | if (node.nodeType == NODE_TYPE_ELEMENT) { |
| 8392 | if (node.hasAttribute(attrStart)) depth++; |
| 8393 | if (node.hasAttribute(attrEnd)) depth--; |
| 8394 | } |
| 8395 | nodes.push(node); |
| 8396 | node = node.nextSibling; |
| 8397 | } while (depth > 0); |
| 8398 | } else { |
| 8399 | nodes.push(node); |
| 8400 | } |
| 8401 | |
| 8402 | return jqLite(nodes); |
| 8403 | } |
| 8404 | |
| 8405 | /** |
| 8406 | * Wrapper for linking function which converts normal linking function into a grouped |
no outgoing calls
no test coverage detected