* 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)
| 7277 | * @returns {*} |
| 7278 | */ |
| 7279 | function groupScan(node, attrStart, attrEnd) { |
| 7280 | var nodes = []; |
| 7281 | var depth = 0; |
| 7282 | if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) { |
| 7283 | do { |
| 7284 | if (!node) { |
| 7285 | throw $compileMinErr('uterdir', |
| 7286 | "Unterminated attribute, found '{0}' but no matching '{1}' found.", |
| 7287 | attrStart, attrEnd); |
| 7288 | } |
| 7289 | if (node.nodeType == NODE_TYPE_ELEMENT) { |
| 7290 | if (node.hasAttribute(attrStart)) depth++; |
| 7291 | if (node.hasAttribute(attrEnd)) depth--; |
| 7292 | } |
| 7293 | nodes.push(node); |
| 7294 | node = node.nextSibling; |
| 7295 | } while (depth > 0); |
| 7296 | } else { |
| 7297 | nodes.push(node); |
| 7298 | } |
| 7299 | |
| 7300 | return jqLite(nodes); |
| 7301 | } |
| 7302 | |
| 7303 | /** |
| 7304 | * Wrapper for linking function which converts normal linking function into a grouped |
no outgoing calls
no test coverage detected