We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31597b7 commit f38648cCopy full SHA for f38648c
src/selector.js
@@ -6,7 +6,7 @@
6
*/
7
(function(){
8
9
-var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]+['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,
10
done = 0,
11
toString = Object.prototype.toString;
12
test/unit/selector.js
@@ -215,7 +215,7 @@ test("child and adjacent", function() {
215
});
216
217
test("attributes", function() {
218
- expect(35);
+ expect(37);
219
t( "Attribute Exists", "a[title]", ["google"] );
220
t( "Attribute Exists", "*[title]", ["google"] );
221
t( "Attribute Exists", "[title]", ["google"] );
@@ -252,6 +252,9 @@ test("attributes", function() {
252
t( "Attribute Ends With", "a[href $= 'org/']", ["mark"] );
253
t( "Attribute Contains", "a[href *= 'google']", ["google","groups"] );
254
t( "Attribute Is Not Equal", "#ap a[hreflang!='en']", ["google","groups","anchor1"] );
255
+
256
+ t("Empty values", "#select1 option[value='']", ["option1a"]);
257
+ t("Empty values", "#select1 option[value!='']", ["option1b","option1c","option1d"]);
258
259
t("Select options via :selected", "#select1 option:selected", ["option1a"] );
260
t("Select options via :selected", "#select2 option:selected", ["option2d"] );
0 commit comments