Permalink
Browse files

fixed pseudos regex

  • Loading branch information...
1 parent 6babe71 commit 8f7390f898aebaa24db6dbfbdb8e65663aff98e4 @rvagg rvagg committed Jan 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/qwery.js
View
@@ -23,7 +23,7 @@
, specialChars = /([.*+?\^=!:${}()|\[\]\/\\])/g
, simple = /^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/
, attr = /\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/
- , pseudo = /:([\w\-]+)(\(['"]?([\s\w\+\-]+)['"]?\))?/
+ , pseudo = /:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/
// check if we can pass a selector to a non-CSS3 compatible qSA.
// *not* suitable for validating a selector, it's too lose; it's the users' responsibility to pass valid selectors
// this regex must be kept in sync with the one in tests.js

0 comments on commit 8f7390f

Please sign in to comment.