Skip to content
Browse files

self-closing sibling selectors pass their tests

  • Loading branch information...
1 parent 05cda53 commit 10fd3dfa41846c0030d2ed663238a6fe6176b328 @substack substack committed Mar 17, 2012
Showing with 3 additions and 5 deletions.
  1. +2 −4 lib/select.js
  2. +1 −1 test/special.js
View
6 lib/select.js
@@ -123,10 +123,8 @@ function createSelector (selector, fn, special) {
var sel = function (tag, parser) {
var tags = parser.tags;
- if (special.indexOf(tag.name) < 0) {
- if (!siblings[tags.length]) siblings[tags.length] = [];
- siblings[tags.length].push(tag);
- }
+ if (!siblings[tags.length]) siblings[tags.length] = [];
+ siblings[tags.length].push(tag);
if (depth > tags.length) return;
View
2 test/special.js
@@ -29,7 +29,7 @@ test('special tags', function (t) {
t.equal(node.attributes.type, 'submit');
});
- tr.select('input + .d', function (node) {
+ tr.select('br + .d', function (node) {
node.html(function (html) {
t.equal(html, 'wooo');
});

0 comments on commit 10fd3df

Please sign in to comment.
Something went wrong with that request. Please try again.