From b28f96949ac477b1fe43c81df7cedc21c7ab184c Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 11 Jun 2013 13:08:21 -0700 Subject: fix($compile): support multi-element group over text nodes --- src/ng/compile.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ng/compile.js b/src/ng/compile.js index d231fb40..ba6e6306 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -591,8 +591,10 @@ function $CompileProvider($provide) { if (!node) { throw ngError(51, "Unterminated attribute, found '{0}' but no matching '{1}' found.", attrStart, attrEnd); } - if (node.hasAttribute(attrStart)) depth++; - if (node.hasAttribute(attrEnd)) depth--; + if (node.nodeType == 1 /** Element **/) { + if (node.hasAttribute(attrStart)) depth++; + if (node.hasAttribute(attrEnd)) depth--; + } nodes.push(node); node = node.nextSibling; } while (depth > 0); -- cgit v1.2.3