From d97466a7c13358e4913399e0c446ec9c3ac58dbc Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Wed, 25 Feb 2009 23:55:29 -0600 Subject: [PATCH] Corrected a regex that was not picking up on attributes with hyphens. --- src/dom/selector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dom/selector.js b/src/dom/selector.js index 3dc4791..b5a8ea4 100644 --- a/src/dom/selector.js +++ b/src/dom/selector.js @@ -340,7 +340,7 @@ Object.extend(Selector, { { name: 'id', re: /^#([\w\-\*]+)(\b|$)/ }, { name: 'className', re: /^\.([\w\-\*]+)(\b|$)/ }, { name: 'pseudo', re: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/ }, - { name: 'attrPresence', re: /^\[((?:[\w-]+:)?[\w]+)\]/ }, + { name: 'attrPresence', re: /^\[((?:[\w-]+:)?[\w-]+)\]/ }, { name: 'attr', re: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ } ],