Skip to content

Commit 2a49b17

Browse files
committed
[xml-hint addon] Filter out !attrs from top level completions
1 parent 77605d5 commit 2a49b17

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

addon/hint/xml-hint.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
for (var i = 0; i < childList.length; ++i) if (!prefix || childList[i].lastIndexOf(prefix, 0) == 0)
3232
result.push("<" + childList[i]);
3333
} else if (tagType != "close") {
34-
for (var name in tags) if (tags.hasOwnProperty(name) && name != "!top" && (!prefix || name.lastIndexOf(prefix, 0) == 0))
35-
result.push("<" + name);
34+
for (var name in tags)
35+
if (tags.hasOwnProperty(name) && name != "!top" && name != "!attrs" && (!prefix || name.lastIndexOf(prefix, 0) == 0))
36+
result.push("<" + name);
3637
}
3738
if (cx && (!prefix || tagType == "close" && cx.tagName.lastIndexOf(prefix, 0) == 0))
3839
result.push("</" + cx.tagName + ">");

0 commit comments

Comments
 (0)