{"action":"opened","number":42,"pull_request":{"url":"https://api.github.com/repos/lexborisov/Modest/pulls/42","id":177259807,"html_url":"https://github.com/lexborisov/Modest/pull/42","diff_url":"https://github.com/lexborisov/Modest/pull/42.diff","patch_url":"https://github.com/lexborisov/Modest/pull/42.patch","issue_url":"https://api.github.com/repos/lexborisov/Modest/issues/42","number":42,"state":"open","locked":false,"title":"Add CSS selector for \":contains(text)\" ","user":{"login":"f34nk","id":3737950,"avatar_url":"https://avatars3.githubusercontent.com/u/3737950?v=4","gravatar_id":"","url":"https://api.github.com/users/f34nk","html_url":"https://github.com/f34nk","followers_url":"https://api.github.com/users/f34nk/followers","following_url":"https://api.github.com/users/f34nk/following{/other_user}","gists_url":"https://api.github.com/users/f34nk/gists{/gist_id}","starred_url":"https://api.github.com/users/f34nk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f34nk/subscriptions","organizations_url":"https://api.github.com/users/f34nk/orgs","repos_url":"https://api.github.com/users/f34nk/repos","events_url":"https://api.github.com/users/f34nk/events{/privacy}","received_events_url":"https://api.github.com/users/f34nk/received_events","type":"User","site_admin":false},"body":"Hey Alex,\r\nI followed your instructions in [#36](https://github.com/lexborisov/Modest/issues/36) and added new pseudo class \"contains\".\r\n\r\n- added \"contains\" to `$func_map = {...}`\r\n- run script `perl utils/MyCSS/functions.pl` \r\n- added all \"contains\" related functions and enums\r\n- function `mycss_selectors_function_begin_contains()` in file **function.c**:\r\nadded selector sub_type `MyCSS_SELECTORS_SUB_TYPE_PSEUDO_CLASS_FUNCTION_CONTAINS`\r\n- added test `test/myhtml/pseudo_class_contains.c`\r\n- implemented finder function in `modest_finder_selector_sub_type_pseudo_class_function_contains()` in file **pseudo_class.c**.\r\n\r\nAs of now, the selector argument cannot contain single or double quotation marks. That's because I basically duplicated the implementation from pseudo class \"has\", so behavior and serialization is the same.\r\n\r\nExample:\r\n```\r\nconst char *selector = \":contains(Hello)\"; // works\r\nconst char *selector = \":contains('Hello')\"; // Bad Selector\r\nconst char *selector = \":contains(\\\"Hello\\\")\"; // Bad Selector\r\n```\r\n\r\nAccording to the [spec](https://www.w3.org/TR/2001/CR-css3-selectors-20011113/#content-selectors) (from 2001) however, quotation marks should also be supported.\r\n> The :contains(\"foo\") pseudo-class notation represents an element whose textual contents contain the given substring. The argument of this pseudo-class can be a string (surrounded by double quotes) or a keyword.\r\n\r\nBest, \r\nFrank","created_at":"2018-03-24T21:30:03Z","updated_at":"2018-03-24T21:30:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lexborisov/Modest/pulls/42/commits","review_comments_url":"https://api.github.com/repos/lexborisov/Modest/pulls/42/comments","review_comment_url":"https://api.github.com/repos/lexborisov/Modest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lexborisov/Modest/issues/42/comments","statuses_url":"https://api.github.com/repos/lexborisov/Modest/statuses/11bddf68331963c1eb04766df25041cbb21bfd75","head":{"label":"f34nk:support-for-pseudo-class-contains","ref":"support-for-pseudo-class-contains","sha":"11bddf68331963c1eb04766df25041cbb21bfd75","user":{"login":"f34nk","id":3737950,"avatar_url":"https://avatars3.githubusercontent.com/u/3737950?v=4","gravatar_id":"","url":"https://api.github.com/users/f34nk","html_url":"https://github.com/f34nk","followers_url":"https://api.github.com/users/f34nk/followers","following_url":"https://api.github.com/users/f34nk/following{/other_user}","gists_url":"https://api.github.com/users/f34nk/gists{/gist_id}","starred_url":"https://api.github.com/users/f34nk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f34nk/subscriptions","organizations_url":"https://api.github.com/users/f34nk/orgs","repos_url":"https://api.github.com/users/f34nk/repos","events_url":"https://api.github.com/users/f34nk/events{/privacy}","received_events_url":"https://api.github.com/users/f34nk/received_events","type":"User","site_admin":false},"repo":{"id":123181767,"name":"Modest","full_name":"f34nk/Modest","owner":{"login":"f34nk","id":3737950,"avatar_url":"https://avatars3.githubusercontent.com/u/3737950?v=4","gravatar_id":"","url":"https://api.github.com/users/f34nk","html_url":"https://github.com/f34nk","followers_url":"https://api.github.com/users/f34nk/followers","following_url":"https://api.github.com/users/f34nk/following{/other_user}","gists_url":"https://api.github.com/users/f34nk/gists{/gist_id}","starred_url":"https://api.github.com/users/f34nk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f34nk/subscriptions","organizations_url":"https://api.github.com/users/f34nk/orgs","repos_url":"https://api.github.com/users/f34nk/repos","events_url":"https://api.github.com/users/f34nk/events{/privacy}","received_events_url":"https://api.github.com/users/f34nk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/f34nk/Modest","description":"Modest is a fast HTML renderer implemented as a pure C99 library with no outside dependencies. This is my branch \"support-for-pseudo-class-contains\" (issue is pending)","fork":true,"url":"https://api.github.com/repos/f34nk/Modest","forks_url":"https://api.github.com/repos/f34nk/Modest/forks","keys_url":"https://api.github.com/repos/f34nk/Modest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/f34nk/Modest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/f34nk/Modest/teams","hooks_url":"https://api.github.com/repos/f34nk/Modest/hooks","issue_events_url":"https://api.github.com/repos/f34nk/Modest/issues/events{/number}","events_url":"https://api.github.com/repos/f34nk/Modest/events","assignees_url":"https://api.github.com/repos/f34nk/Modest/assignees{/user}","branches_url":"https://api.github.com/repos/f34nk/Modest/branches{/branch}","tags_url":"https://api.github.com/repos/f34nk/Modest/tags","blobs_url":"https://api.github.com/repos/f34nk/Modest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/f34nk/Modest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/f34nk/Modest/git/refs{/sha}","trees_url":"https://api.github.com/repos/f34nk/Modest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/f34nk/Modest/statuses/{sha}","languages_url":"https://api.github.com/repos/f34nk/Modest/languages","stargazers_url":"https://api.github.com/repos/f34nk/Modest/stargazers","contributors_url":"https://api.github.com/repos/f34nk/Modest/contributors","subscribers_url":"https://api.github.com/repos/f34nk/Modest/subscribers","subscription_url":"https://api.github.com/repos/f34nk/Modest/subscription","commits_url":"https://api.github.com/repos/f34nk/Modest/commits{/sha}","git_commits_url":"https://api.github.com/repos/f34nk/Modest/git/commits{/sha}","comments_url":"https://api.github.com/repos/f34nk/Modest/comments{/number}","issue_comment_url":"https://api.github.com/repos/f34nk/Modest/issues/comments{/number}","contents_url":"https://api.github.com/repos/f34nk/Modest/contents/{+path}","compare_url":"https://api.github.com/repos/f34nk/Modest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/f34nk/Modest/merges","archive_url":"https://api.github.com/repos/f34nk/Modest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/f34nk/Modest/downloads","issues_url":"https://api.github.com/repos/f34nk/Modest/issues{/number}","pulls_url":"https://api.github.com/repos/f34nk/Modest/pulls{/number}","milestones_url":"https://api.github.com/repos/f34nk/Modest/milestones{/number}","notifications_url":"https://api.github.com/repos/f34nk/Modest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/f34nk/Modest/labels{/name}","releases_url":"https://api.github.com/repos/f34nk/Modest/releases{/id}","deployments_url":"https://api.github.com/repos/f34nk/Modest/deployments","created_at":"2018-02-27T20:06:28Z","updated_at":"2018-03-24T21:28:12Z","pushed_at":"2018-03-24T21:28:11Z","git_url":"git://github.com/f34nk/Modest.git","ssh_url":"git@github.com:f34nk/Modest.git","clone_url":"https://github.com/f34nk/Modest.git","svn_url":"https://github.com/f34nk/Modest","homepage":"https://github.com/lexborisov/Modest/issues/36","size":8311,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"support-for-pseudo-class-contains"}},"base":{"label":"lexborisov:master","ref":"master","sha":"000578ae730c353c67fd2d4ea936673a01acf087","user":{"login":"lexborisov","id":4179845,"avatar_url":"https://avatars0.githubusercontent.com/u/4179845?v=4","gravatar_id":"","url":"https://api.github.com/users/lexborisov","html_url":"https://github.com/lexborisov","followers_url":"https://api.github.com/users/lexborisov/followers","following_url":"https://api.github.com/users/lexborisov/following{/other_user}","gists_url":"https://api.github.com/users/lexborisov/gists{/gist_id}","starred_url":"https://api.github.com/users/lexborisov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexborisov/subscriptions","organizations_url":"https://api.github.com/users/lexborisov/orgs","repos_url":"https://api.github.com/users/lexborisov/repos","events_url":"https://api.github.com/users/lexborisov/events{/privacy}","received_events_url":"https://api.github.com/users/lexborisov/received_events","type":"User","site_admin":false},"repo":{"id":66791244,"name":"Modest","full_name":"lexborisov/Modest","owner":{"login":"lexborisov","id":4179845,"avatar_url":"https://avatars0.githubusercontent.com/u/4179845?v=4","gravatar_id":"","url":"https://api.github.com/users/lexborisov","html_url":"https://github.com/lexborisov","followers_url":"https://api.github.com/users/lexborisov/followers","following_url":"https://api.github.com/users/lexborisov/following{/other_user}","gists_url":"https://api.github.com/users/lexborisov/gists{/gist_id}","starred_url":"https://api.github.com/users/lexborisov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexborisov/subscriptions","organizations_url":"https://api.github.com/users/lexborisov/orgs","repos_url":"https://api.github.com/users/lexborisov/repos","events_url":"https://api.github.com/users/lexborisov/events{/privacy}","received_events_url":"https://api.github.com/users/lexborisov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lexborisov/Modest","description":"Modest is a fast HTML renderer implemented as a pure C99 library with no outside dependencies.","fork":false,"url":"https://api.github.com/repos/lexborisov/Modest","forks_url":"https://api.github.com/repos/lexborisov/Modest/forks","keys_url":"https://api.github.com/repos/lexborisov/Modest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lexborisov/Modest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lexborisov/Modest/teams","hooks_url":"https://api.github.com/repos/lexborisov/Modest/hooks","issue_events_url":"https://api.github.com/repos/lexborisov/Modest/issues/events{/number}","events_url":"https://api.github.com/repos/lexborisov/Modest/events","assignees_url":"https://api.github.com/repos/lexborisov/Modest/assignees{/user}","branches_url":"https://api.github.com/repos/lexborisov/Modest/branches{/branch}","tags_url":"https://api.github.com/repos/lexborisov/Modest/tags","blobs_url":"https://api.github.com/repos/lexborisov/Modest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lexborisov/Modest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lexborisov/Modest/git/refs{/sha}","trees_url":"https://api.github.com/repos/lexborisov/Modest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lexborisov/Modest/statuses/{sha}","languages_url":"https://api.github.com/repos/lexborisov/Modest/languages","stargazers_url":"https://api.github.com/repos/lexborisov/Modest/stargazers","contributors_url":"https://api.github.com/repos/lexborisov/Modest/contributors","subscribers_url":"https://api.github.com/repos/lexborisov/Modest/subscribers","subscription_url":"https://api.github.com/repos/lexborisov/Modest/subscription","commits_url":"https://api.github.com/repos/lexborisov/Modest/commits{/sha}","git_commits_url":"https://api.github.com/repos/lexborisov/Modest/git/commits{/sha}","comments_url":"https://api.github.com/repos/lexborisov/Modest/comments{/number}","issue_comment_url":"https://api.github.com/repos/lexborisov/Modest/issues/comments{/number}","contents_url":"https://api.github.com/repos/lexborisov/Modest/contents/{+path}","compare_url":"https://api.github.com/repos/lexborisov/Modest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lexborisov/Modest/merges","archive_url":"https://api.github.com/repos/lexborisov/Modest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lexborisov/Modest/downloads","issues_url":"https://api.github.com/repos/lexborisov/Modest/issues{/number}","pulls_url":"https://api.github.com/repos/lexborisov/Modest/pulls{/number}","milestones_url":"https://api.github.com/repos/lexborisov/Modest/milestones{/number}","notifications_url":"https://api.github.com/repos/lexborisov/Modest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lexborisov/Modest/labels{/name}","releases_url":"https://api.github.com/repos/lexborisov/Modest/releases{/id}","deployments_url":"https://api.github.com/repos/lexborisov/Modest/deployments","created_at":"2016-08-28T21:17:24Z","updated_at":"2018-03-21T11:03:00Z","pushed_at":"2018-03-21T11:02:59Z","git_url":"git://github.com/lexborisov/Modest.git","ssh_url":"git@github.com:lexborisov/Modest.git","clone_url":"https://github.com/lexborisov/Modest.git","svn_url":"https://github.com/lexborisov/Modest","homepage":"","size":4145,"stargazers_count":281,"watchers_count":281,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":17,"open_issues":11,"watchers":281,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lexborisov/Modest/pulls/42"},"html":{"href":"https://github.com/lexborisov/Modest/pull/42"},"issue":{"href":"https://api.github.com/repos/lexborisov/Modest/issues/42"},"comments":{"href":"https://api.github.com/repos/lexborisov/Modest/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/lexborisov/Modest/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/lexborisov/Modest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lexborisov/Modest/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/lexborisov/Modest/statuses/11bddf68331963c1eb04766df25041cbb21bfd75"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":17,"additions":339,"deletions":43,"changed_files":25}}
{"actor":{"display_login":"f34nk"}}