Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The :icontains selector also needs to be stripped of quotes. #15

Merged
merged 1 commit into from
Oct 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ var unpackPseudos = {

var stripQuotesFromPseudos = {
__proto__: null,
"contains": true
"contains": true,
"icontains": true
};

var quotes = {
Expand Down
26 changes: 26 additions & 0 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,32 @@ var tests = [
],
"pseudo selector with data"
],
[
":icontains('')",
[
[
{
"type": "pseudo",
"name": "icontains",
"data": ""
}
]
],
"pseudo selector with quote-stripped data"
],
[
":contains(\"(foo)\")",
[
[
{
"type": "pseudo",
"name": "contains",
"data": "(foo)"
}
]
],
"pseudo selector with data"
],

//multiple selectors
[
Expand Down