Permalink
Browse files

throw error on bad selector.

  • Loading branch information...
1 parent 8fd8042 commit 2c7f61bf24fd2f8bfafbb8a71e09c6396a191552 @chjj committed Mar 8, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/zest.js
View
@@ -8,6 +8,7 @@
// - Recognize the TR subject selector when parsing.
// - Pass context to scope.
// - Add :column pseudo-classes.
+// - Full support for path/domain parts in :local-link.
;(function() {
@@ -336,7 +337,6 @@ var selectors = {
if (el.nodeName) {
return el.href && el.host === window.location.host;
}
- // TODO: Full support for path/domain parts.
var param = el;
return function(el) {
return selectors[':local-link'](el);
@@ -566,8 +566,7 @@ var compile = function(sel) {
buff.push(tok(qname, true));
buff.push(tok(cap));
} else {
- sel = '';
- break;
+ throw new Error('Invalid selector.');
}
while (cap = rules.simple.exec(sel)) {

0 comments on commit 2c7f61b

Please sign in to comment.