{"action":"created","comment":{"url":"https://api.github.com/repos/fb55/css-select/pulls/comments/45557888","id":45557888,"diff_hunk":"@@ -0,0 +1,87 @@\n+var CSSselect = require(\"../\"),\n+    makeDom = require(\"htmlparser2\").parseDOM,\n+    falseFunc = require(\"boolbase\").falseFunc,\n+    assert = require(\"assert\");\n+\n+var dom = makeDom(\"<div><p>In the end, it doesn't really Matter.</p><div>Indeed-that's a delicate matter.</div>\");\n+\n+describe(\"icontains\", function(){\n+\tdescribe(\"ignore case\", function(){\n+\t\tit(\"should match full string\", function(){\n+\t\t\tvar matches = CSSselect.selectAll(\":icontains(indeed-that's a delicate matter.)\", dom);\n+\t\t\tassert.equal(matches.length, 2);\n+\t\t\tassert.deepEqual(matches, [dom[0], dom[0].children[1]]);\n+\t\t\tmatches = CSSselect.selectAll(\":icontains(inDeeD-THAT's a DELICATE matteR.)\", dom);\n+\t\t\tassert.equal(matches.length, 2);\n+\t\t\tassert.deepEqual(matches, [dom[0], dom[0].children[1]]);\n+\t\t});\n+\n+\t\tit(\"should match substring\", function(){\n+\t\t\tvar matches = CSSselect.selectAll(\":icontains(indeed)\", dom);\n+\t\t\tassert.equal(matches.length, 2);\n+\t\t\tassert.deepEqual(matches, [dom[0], dom[0].children[1]]);\n+\t\t\tmatches = CSSselect.selectAll(\":icontains(inDeeD)\", dom);\n+\t\t\tassert.equal(matches.length, 2);\n+\t\t\tassert.deepEqual(matches, [dom[0], dom[0].children[1]]);\n+\t\t});\n+\n+\t\tit(\"should match specific element\", function(){\n+\t\t\tvar matches = CSSselect.selectAll(\"p:icontains(matter)\", dom);\n+\t\t\tassert.equal(matches.length, 1);\n+\t\t\tassert.deepEqual(matches, [dom[0].children[0]]);\n+\t\t\tmatches = CSSselect.selectAll(\"p:icontains(mATter)\", dom);\n+\t\t\tassert.equal(matches.length, 1);\n+\t\t\tassert.deepEqual(matches, [dom[0].children[0]]);\n+\t\t});\n+\n+\t\tit(\"should match multiple elements\", function(){\n+\t\t\tvar matches = CSSselect.selectAll(\":icontains(matter)\", dom);\n+\t\t\tassert.equal(matches.length, 3);\n+\t\t\tassert.deepEqual(matches, [dom[0], dom[0].children[0],\n+                dom[0].children[1]]);\n+\t\t\tmatches = CSSselect.selectAll(\":icontains(mATter)\", dom);\n+\t\t\tassert.equal(matches.length, 3);\n+\t\t\tassert.deepEqual(matches, [dom[0], dom[0].children[0],\n+                dom[0].children[1]]);\n+\t\t});\n+\n+\t\tit(\"should match empty string\", function(){\n+            var matches = CSSselect.selectAll(\":icontains()\", dom);\n+\t\t\tassert.equal(matches.length, 3);\n+\t\t\tassert.deepEqual(matches, [dom[0], dom[0].children[0],\n+                dom[0].children[1]]);\n+\t\t});\n+\n+\t\tit(\"should match quoted string\", function(){\n+            var matches = CSSselect.selectAll(\":icontains('')\", dom);\n+\t\t\tassert.equal(matches.length, 3);\n+\t\t\tassert.deepEqual(matches, [dom[0], dom[0].children[0],\n+                dom[0].children[1]]);\n+            matches = CSSselect.selectAll(\"p:icontains('matter')\", dom);\n+\t\t\tassert.equal(matches.length, 1);\n+\t\t\tassert.deepEqual(matches, [dom[0].children[0]]);\n+            matches = CSSselect.selectAll('p:icontains(\"matter\")', dom);","path":"test/icontains.js","position":63,"original_position":63,"commit_id":"459714e82a1024d30c6142e186073dbe2a9be4da","original_commit_id":"459714e82a1024d30c6142e186073dbe2a9be4da","user":{"login":"fb55","id":188768,"avatar_url":"https://avatars.githubusercontent.com/u/188768?v=3","gravatar_id":"","url":"https://api.github.com/users/fb55","html_url":"https://github.com/fb55","followers_url":"https://api.github.com/users/fb55/followers","following_url":"https://api.github.com/users/fb55/following{/other_user}","gists_url":"https://api.github.com/users/fb55/gists{/gist_id}","starred_url":"https://api.github.com/users/fb55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fb55/subscriptions","organizations_url":"https://api.github.com/users/fb55/orgs","repos_url":"https://api.github.com/users/fb55/repos","events_url":"https://api.github.com/users/fb55/events{/privacy}","received_events_url":"https://api.github.com/users/fb55/received_events","type":"User","site_admin":false},"body":"Strings must use double quotes (even when that requires escaping double quotes inside the string).","created_at":"2015-11-22T11:51:20Z","updated_at":"2015-11-22T11:51:20Z","html_url":"https://github.com/fb55/css-select/pull/34#discussion_r45557888","pull_request_url":"https://api.github.com/repos/fb55/css-select/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/fb55/css-select/pulls/comments/45557888"},"html":{"href":"https://github.com/fb55/css-select/pull/34#discussion_r45557888"},"pull_request":{"href":"https://api.github.com/repos/fb55/css-select/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/fb55/css-select/pulls/34","id":49109868,"html_url":"https://github.com/fb55/css-select/pull/34","diff_url":"https://github.com/fb55/css-select/pull/34.diff","patch_url":"https://github.com/fb55/css-select/pull/34.patch","issue_url":"https://api.github.com/repos/fb55/css-select/issues/34","number":34,"state":"open","locked":false,"title":"pseudos: implement :icontains, case-insensitive version of :contains","user":{"login":"ganeshv","id":827790,"avatar_url":"https://avatars.githubusercontent.com/u/827790?v=3","gravatar_id":"","url":"https://api.github.com/users/ganeshv","html_url":"https://github.com/ganeshv","followers_url":"https://api.github.com/users/ganeshv/followers","following_url":"https://api.github.com/users/ganeshv/following{/other_user}","gists_url":"https://api.github.com/users/ganeshv/gists{/gist_id}","starred_url":"https://api.github.com/users/ganeshv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganeshv/subscriptions","organizations_url":"https://api.github.com/users/ganeshv/orgs","repos_url":"https://api.github.com/users/ganeshv/repos","events_url":"https://api.github.com/users/ganeshv/events{/privacy}","received_events_url":"https://api.github.com/users/ganeshv/received_events","type":"User","site_admin":false},"body":"As discussed in [issue 33](https://github.com/fb55/css-select/issues/33), with tests.\r\n\r\nOne of the tests fails and needs a corresponding fix in css-what to strip the quotes of `icontains` data. I have opened a separate [PR](https://github.com/fb55/css-what/pull/15) for that issue.","created_at":"2015-10-29T08:25:32Z","updated_at":"2015-11-22T11:51:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36f4fd561432ba4bb97a869985c0b1bea33fd9c3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fb55/css-select/pulls/34/commits","review_comments_url":"https://api.github.com/repos/fb55/css-select/pulls/34/comments","review_comment_url":"https://api.github.com/repos/fb55/css-select/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fb55/css-select/issues/34/comments","statuses_url":"https://api.github.com/repos/fb55/css-select/statuses/459714e82a1024d30c6142e186073dbe2a9be4da","head":{"label":"pigshell:icontains","ref":"icontains","sha":"459714e82a1024d30c6142e186073dbe2a9be4da","user":{"login":"pigshell","id":8201498,"avatar_url":"https://avatars.githubusercontent.com/u/8201498?v=3","gravatar_id":"","url":"https://api.github.com/users/pigshell","html_url":"https://github.com/pigshell","followers_url":"https://api.github.com/users/pigshell/followers","following_url":"https://api.github.com/users/pigshell/following{/other_user}","gists_url":"https://api.github.com/users/pigshell/gists{/gist_id}","starred_url":"https://api.github.com/users/pigshell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pigshell/subscriptions","organizations_url":"https://api.github.com/users/pigshell/orgs","repos_url":"https://api.github.com/users/pigshell/repos","events_url":"https://api.github.com/users/pigshell/events{/privacy}","received_events_url":"https://api.github.com/users/pigshell/received_events","type":"Organization","site_admin":false},"repo":{"id":44897578,"name":"css-select","full_name":"pigshell/css-select","owner":{"login":"pigshell","id":8201498,"avatar_url":"https://avatars.githubusercontent.com/u/8201498?v=3","gravatar_id":"","url":"https://api.github.com/users/pigshell","html_url":"https://github.com/pigshell","followers_url":"https://api.github.com/users/pigshell/followers","following_url":"https://api.github.com/users/pigshell/following{/other_user}","gists_url":"https://api.github.com/users/pigshell/gists{/gist_id}","starred_url":"https://api.github.com/users/pigshell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pigshell/subscriptions","organizations_url":"https://api.github.com/users/pigshell/orgs","repos_url":"https://api.github.com/users/pigshell/repos","events_url":"https://api.github.com/users/pigshell/events{/privacy}","received_events_url":"https://api.github.com/users/pigshell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pigshell/css-select","description":"a CSS selector compiler/engine","fork":true,"url":"https://api.github.com/repos/pigshell/css-select","forks_url":"https://api.github.com/repos/pigshell/css-select/forks","keys_url":"https://api.github.com/repos/pigshell/css-select/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pigshell/css-select/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pigshell/css-select/teams","hooks_url":"https://api.github.com/repos/pigshell/css-select/hooks","issue_events_url":"https://api.github.com/repos/pigshell/css-select/issues/events{/number}","events_url":"https://api.github.com/repos/pigshell/css-select/events","assignees_url":"https://api.github.com/repos/pigshell/css-select/assignees{/user}","branches_url":"https://api.github.com/repos/pigshell/css-select/branches{/branch}","tags_url":"https://api.github.com/repos/pigshell/css-select/tags","blobs_url":"https://api.github.com/repos/pigshell/css-select/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pigshell/css-select/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pigshell/css-select/git/refs{/sha}","trees_url":"https://api.github.com/repos/pigshell/css-select/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pigshell/css-select/statuses/{sha}","languages_url":"https://api.github.com/repos/pigshell/css-select/languages","stargazers_url":"https://api.github.com/repos/pigshell/css-select/stargazers","contributors_url":"https://api.github.com/repos/pigshell/css-select/contributors","subscribers_url":"https://api.github.com/repos/pigshell/css-select/subscribers","subscription_url":"https://api.github.com/repos/pigshell/css-select/subscription","commits_url":"https://api.github.com/repos/pigshell/css-select/commits{/sha}","git_commits_url":"https://api.github.com/repos/pigshell/css-select/git/commits{/sha}","comments_url":"https://api.github.com/repos/pigshell/css-select/comments{/number}","issue_comment_url":"https://api.github.com/repos/pigshell/css-select/issues/comments{/number}","contents_url":"https://api.github.com/repos/pigshell/css-select/contents/{+path}","compare_url":"https://api.github.com/repos/pigshell/css-select/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pigshell/css-select/merges","archive_url":"https://api.github.com/repos/pigshell/css-select/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pigshell/css-select/downloads","issues_url":"https://api.github.com/repos/pigshell/css-select/issues{/number}","pulls_url":"https://api.github.com/repos/pigshell/css-select/pulls{/number}","milestones_url":"https://api.github.com/repos/pigshell/css-select/milestones{/number}","notifications_url":"https://api.github.com/repos/pigshell/css-select/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pigshell/css-select/labels{/name}","releases_url":"https://api.github.com/repos/pigshell/css-select/releases{/id}","created_at":"2015-10-25T05:17:57Z","updated_at":"2015-10-25T05:17:58Z","pushed_at":"2015-10-30T09:01:33Z","git_url":"git://github.com/pigshell/css-select.git","ssh_url":"git@github.com:pigshell/css-select.git","clone_url":"https://github.com/pigshell/css-select.git","svn_url":"https://github.com/pigshell/css-select","homepage":"","size":339,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fb55:master","ref":"master","sha":"d4c8ca19dd5003ee8add30b0e565656d3001c8e1","user":{"login":"fb55","id":188768,"avatar_url":"https://avatars.githubusercontent.com/u/188768?v=3","gravatar_id":"","url":"https://api.github.com/users/fb55","html_url":"https://github.com/fb55","followers_url":"https://api.github.com/users/fb55/followers","following_url":"https://api.github.com/users/fb55/following{/other_user}","gists_url":"https://api.github.com/users/fb55/gists{/gist_id}","starred_url":"https://api.github.com/users/fb55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fb55/subscriptions","organizations_url":"https://api.github.com/users/fb55/orgs","repos_url":"https://api.github.com/users/fb55/repos","events_url":"https://api.github.com/users/fb55/events{/privacy}","received_events_url":"https://api.github.com/users/fb55/received_events","type":"User","site_admin":false},"repo":{"id":3411063,"name":"css-select","full_name":"fb55/css-select","owner":{"login":"fb55","id":188768,"avatar_url":"https://avatars.githubusercontent.com/u/188768?v=3","gravatar_id":"","url":"https://api.github.com/users/fb55","html_url":"https://github.com/fb55","followers_url":"https://api.github.com/users/fb55/followers","following_url":"https://api.github.com/users/fb55/following{/other_user}","gists_url":"https://api.github.com/users/fb55/gists{/gist_id}","starred_url":"https://api.github.com/users/fb55/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fb55/subscriptions","organizations_url":"https://api.github.com/users/fb55/orgs","repos_url":"https://api.github.com/users/fb55/repos","events_url":"https://api.github.com/users/fb55/events{/privacy}","received_events_url":"https://api.github.com/users/fb55/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fb55/css-select","description":"a CSS selector compiler/engine","fork":false,"url":"https://api.github.com/repos/fb55/css-select","forks_url":"https://api.github.com/repos/fb55/css-select/forks","keys_url":"https://api.github.com/repos/fb55/css-select/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fb55/css-select/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fb55/css-select/teams","hooks_url":"https://api.github.com/repos/fb55/css-select/hooks","issue_events_url":"https://api.github.com/repos/fb55/css-select/issues/events{/number}","events_url":"https://api.github.com/repos/fb55/css-select/events","assignees_url":"https://api.github.com/repos/fb55/css-select/assignees{/user}","branches_url":"https://api.github.com/repos/fb55/css-select/branches{/branch}","tags_url":"https://api.github.com/repos/fb55/css-select/tags","blobs_url":"https://api.github.com/repos/fb55/css-select/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fb55/css-select/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fb55/css-select/git/refs{/sha}","trees_url":"https://api.github.com/repos/fb55/css-select/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fb55/css-select/statuses/{sha}","languages_url":"https://api.github.com/repos/fb55/css-select/languages","stargazers_url":"https://api.github.com/repos/fb55/css-select/stargazers","contributors_url":"https://api.github.com/repos/fb55/css-select/contributors","subscribers_url":"https://api.github.com/repos/fb55/css-select/subscribers","subscription_url":"https://api.github.com/repos/fb55/css-select/subscription","commits_url":"https://api.github.com/repos/fb55/css-select/commits{/sha}","git_commits_url":"https://api.github.com/repos/fb55/css-select/git/commits{/sha}","comments_url":"https://api.github.com/repos/fb55/css-select/comments{/number}","issue_comment_url":"https://api.github.com/repos/fb55/css-select/issues/comments{/number}","contents_url":"https://api.github.com/repos/fb55/css-select/contents/{+path}","compare_url":"https://api.github.com/repos/fb55/css-select/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fb55/css-select/merges","archive_url":"https://api.github.com/repos/fb55/css-select/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fb55/css-select/downloads","issues_url":"https://api.github.com/repos/fb55/css-select/issues{/number}","pulls_url":"https://api.github.com/repos/fb55/css-select/pulls{/number}","milestones_url":"https://api.github.com/repos/fb55/css-select/milestones{/number}","notifications_url":"https://api.github.com/repos/fb55/css-select/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fb55/css-select/labels{/name}","releases_url":"https://api.github.com/repos/fb55/css-select/releases{/id}","created_at":"2012-02-10T21:06:42Z","updated_at":"2015-11-21T22:30:09Z","pushed_at":"2015-11-22T11:47:23Z","git_url":"git://github.com/fb55/css-select.git","ssh_url":"git@github.com:fb55/css-select.git","clone_url":"https://github.com/fb55/css-select.git","svn_url":"https://github.com/fb55/css-select","homepage":"","size":267,"stargazers_count":71,"watchers_count":71,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":5,"forks":11,"open_issues":5,"watchers":71,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fb55/css-select/pulls/34"},"html":{"href":"https://github.com/fb55/css-select/pull/34"},"issue":{"href":"https://api.github.com/repos/fb55/css-select/issues/34"},"comments":{"href":"https://api.github.com/repos/fb55/css-select/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/fb55/css-select/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/fb55/css-select/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fb55/css-select/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/fb55/css-select/statuses/459714e82a1024d30c6142e186073dbe2a9be4da"}}}}