{"action":"opened","number":186,"pull_request":{"url":"https://api.github.com/repos/alecthomas/chroma/pulls/186","id":224507857,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NTA3ODU3","html_url":"https://github.com/alecthomas/chroma/pull/186","diff_url":"https://github.com/alecthomas/chroma/pull/186.diff","patch_url":"https://github.com/alecthomas/chroma/pull/186.patch","issue_url":"https://api.github.com/repos/alecthomas/chroma/issues/186","number":186,"state":"open","locked":false,"title":"Improve Go lexer to detect functions","user":{"login":"pedrosland","id":119412,"node_id":"MDQ6VXNlcjExOTQxMg==","avatar_url":"https://avatars3.githubusercontent.com/u/119412?v=4","gravatar_id":"","url":"https://api.github.com/users/pedrosland","html_url":"https://github.com/pedrosland","followers_url":"https://api.github.com/users/pedrosland/followers","following_url":"https://api.github.com/users/pedrosland/following{/other_user}","gists_url":"https://api.github.com/users/pedrosland/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrosland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrosland/subscriptions","organizations_url":"https://api.github.com/users/pedrosland/orgs","repos_url":"https://api.github.com/users/pedrosland/repos","events_url":"https://api.github.com/users/pedrosland/events{/privacy}","received_events_url":"https://api.github.com/users/pedrosland/received_events","type":"User","site_admin":false},"body":"Currently the Go lexer doesn't detect functions.\r\n\r\nThis PR adds this functionality making it more like C++ and Java. It may not be perfect but I am not aware of any limitations with this version. One of my earlier attempts had issues with strings containing `)`. Please see screenshots below to see the difference.\r\n\r\nI appreciate that this is a change from Pygments and I can try to get a similar change approved there first if you prefer.\r\n\r\nBefore:\r\n![screenshot from 2018-10-21 00-26-37](https://user-images.githubusercontent.com/119412/47261476-0a877f80-d4c8-11e8-9efd-7060b79ffedb.png)\r\nAfter:\r\n![screenshot from 2018-10-21 00-23-03](https://user-images.githubusercontent.com/119412/47261448-90ef9180-d4c7-11e8-84b2-78c4b908ad5d.png)\r\n","created_at":"2018-10-20T23:34:29Z","updated_at":"2018-10-20T23:34:29Z","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/alecthomas/chroma/pulls/186/commits","review_comments_url":"https://api.github.com/repos/alecthomas/chroma/pulls/186/comments","review_comment_url":"https://api.github.com/repos/alecthomas/chroma/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alecthomas/chroma/issues/186/comments","statuses_url":"https://api.github.com/repos/alecthomas/chroma/statuses/6f498aa6d7f37921e09174e8cb6a9cecbb66ebf5","head":{"label":"pedrosland:go-functions","ref":"go-functions","sha":"6f498aa6d7f37921e09174e8cb6a9cecbb66ebf5","user":{"login":"pedrosland","id":119412,"node_id":"MDQ6VXNlcjExOTQxMg==","avatar_url":"https://avatars3.githubusercontent.com/u/119412?v=4","gravatar_id":"","url":"https://api.github.com/users/pedrosland","html_url":"https://github.com/pedrosland","followers_url":"https://api.github.com/users/pedrosland/followers","following_url":"https://api.github.com/users/pedrosland/following{/other_user}","gists_url":"https://api.github.com/users/pedrosland/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrosland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrosland/subscriptions","organizations_url":"https://api.github.com/users/pedrosland/orgs","repos_url":"https://api.github.com/users/pedrosland/repos","events_url":"https://api.github.com/users/pedrosland/events{/privacy}","received_events_url":"https://api.github.com/users/pedrosland/received_events","type":"User","site_admin":false},"repo":{"id":153956558,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM5NTY1NTg=","name":"chroma","full_name":"pedrosland/chroma","private":false,"owner":{"login":"pedrosland","id":119412,"node_id":"MDQ6VXNlcjExOTQxMg==","avatar_url":"https://avatars3.githubusercontent.com/u/119412?v=4","gravatar_id":"","url":"https://api.github.com/users/pedrosland","html_url":"https://github.com/pedrosland","followers_url":"https://api.github.com/users/pedrosland/followers","following_url":"https://api.github.com/users/pedrosland/following{/other_user}","gists_url":"https://api.github.com/users/pedrosland/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrosland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrosland/subscriptions","organizations_url":"https://api.github.com/users/pedrosland/orgs","repos_url":"https://api.github.com/users/pedrosland/repos","events_url":"https://api.github.com/users/pedrosland/events{/privacy}","received_events_url":"https://api.github.com/users/pedrosland/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pedrosland/chroma","description":"A general purpose syntax highlighter in pure Go ","fork":true,"url":"https://api.github.com/repos/pedrosland/chroma","forks_url":"https://api.github.com/repos/pedrosland/chroma/forks","keys_url":"https://api.github.com/repos/pedrosland/chroma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pedrosland/chroma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pedrosland/chroma/teams","hooks_url":"https://api.github.com/repos/pedrosland/chroma/hooks","issue_events_url":"https://api.github.com/repos/pedrosland/chroma/issues/events{/number}","events_url":"https://api.github.com/repos/pedrosland/chroma/events","assignees_url":"https://api.github.com/repos/pedrosland/chroma/assignees{/user}","branches_url":"https://api.github.com/repos/pedrosland/chroma/branches{/branch}","tags_url":"https://api.github.com/repos/pedrosland/chroma/tags","blobs_url":"https://api.github.com/repos/pedrosland/chroma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pedrosland/chroma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pedrosland/chroma/git/refs{/sha}","trees_url":"https://api.github.com/repos/pedrosland/chroma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pedrosland/chroma/statuses/{sha}","languages_url":"https://api.github.com/repos/pedrosland/chroma/languages","stargazers_url":"https://api.github.com/repos/pedrosland/chroma/stargazers","contributors_url":"https://api.github.com/repos/pedrosland/chroma/contributors","subscribers_url":"https://api.github.com/repos/pedrosland/chroma/subscribers","subscription_url":"https://api.github.com/repos/pedrosland/chroma/subscription","commits_url":"https://api.github.com/repos/pedrosland/chroma/commits{/sha}","git_commits_url":"https://api.github.com/repos/pedrosland/chroma/git/commits{/sha}","comments_url":"https://api.github.com/repos/pedrosland/chroma/comments{/number}","issue_comment_url":"https://api.github.com/repos/pedrosland/chroma/issues/comments{/number}","contents_url":"https://api.github.com/repos/pedrosland/chroma/contents/{+path}","compare_url":"https://api.github.com/repos/pedrosland/chroma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pedrosland/chroma/merges","archive_url":"https://api.github.com/repos/pedrosland/chroma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pedrosland/chroma/downloads","issues_url":"https://api.github.com/repos/pedrosland/chroma/issues{/number}","pulls_url":"https://api.github.com/repos/pedrosland/chroma/pulls{/number}","milestones_url":"https://api.github.com/repos/pedrosland/chroma/milestones{/number}","notifications_url":"https://api.github.com/repos/pedrosland/chroma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pedrosland/chroma/labels{/name}","releases_url":"https://api.github.com/repos/pedrosland/chroma/releases{/id}","deployments_url":"https://api.github.com/repos/pedrosland/chroma/deployments","created_at":"2018-10-20T23:16:49Z","updated_at":"2018-10-20T23:16:52Z","pushed_at":"2018-10-20T23:32:24Z","git_url":"git://github.com/pedrosland/chroma.git","ssh_url":"git@github.com:pedrosland/chroma.git","clone_url":"https://github.com/pedrosland/chroma.git","svn_url":"https://github.com/pedrosland/chroma","homepage":"","size":3834,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"alecthomas:master","ref":"master","sha":"01e18834b5ddd9869ee9946effe6c23c782fb34b","user":{"login":"alecthomas","id":41767,"node_id":"MDQ6VXNlcjQxNzY3","avatar_url":"https://avatars3.githubusercontent.com/u/41767?v=4","gravatar_id":"","url":"https://api.github.com/users/alecthomas","html_url":"https://github.com/alecthomas","followers_url":"https://api.github.com/users/alecthomas/followers","following_url":"https://api.github.com/users/alecthomas/following{/other_user}","gists_url":"https://api.github.com/users/alecthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/alecthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alecthomas/subscriptions","organizations_url":"https://api.github.com/users/alecthomas/orgs","repos_url":"https://api.github.com/users/alecthomas/repos","events_url":"https://api.github.com/users/alecthomas/events{/privacy}","received_events_url":"https://api.github.com/users/alecthomas/received_events","type":"User","site_admin":false},"repo":{"id":93619165,"node_id":"MDEwOlJlcG9zaXRvcnk5MzYxOTE2NQ==","name":"chroma","full_name":"alecthomas/chroma","private":false,"owner":{"login":"alecthomas","id":41767,"node_id":"MDQ6VXNlcjQxNzY3","avatar_url":"https://avatars3.githubusercontent.com/u/41767?v=4","gravatar_id":"","url":"https://api.github.com/users/alecthomas","html_url":"https://github.com/alecthomas","followers_url":"https://api.github.com/users/alecthomas/followers","following_url":"https://api.github.com/users/alecthomas/following{/other_user}","gists_url":"https://api.github.com/users/alecthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/alecthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alecthomas/subscriptions","organizations_url":"https://api.github.com/users/alecthomas/orgs","repos_url":"https://api.github.com/users/alecthomas/repos","events_url":"https://api.github.com/users/alecthomas/events{/privacy}","received_events_url":"https://api.github.com/users/alecthomas/received_events","type":"User","site_admin":false},"html_url":"https://github.com/alecthomas/chroma","description":"A general purpose syntax highlighter in pure Go ","fork":false,"url":"https://api.github.com/repos/alecthomas/chroma","forks_url":"https://api.github.com/repos/alecthomas/chroma/forks","keys_url":"https://api.github.com/repos/alecthomas/chroma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alecthomas/chroma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alecthomas/chroma/teams","hooks_url":"https://api.github.com/repos/alecthomas/chroma/hooks","issue_events_url":"https://api.github.com/repos/alecthomas/chroma/issues/events{/number}","events_url":"https://api.github.com/repos/alecthomas/chroma/events","assignees_url":"https://api.github.com/repos/alecthomas/chroma/assignees{/user}","branches_url":"https://api.github.com/repos/alecthomas/chroma/branches{/branch}","tags_url":"https://api.github.com/repos/alecthomas/chroma/tags","blobs_url":"https://api.github.com/repos/alecthomas/chroma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alecthomas/chroma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alecthomas/chroma/git/refs{/sha}","trees_url":"https://api.github.com/repos/alecthomas/chroma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alecthomas/chroma/statuses/{sha}","languages_url":"https://api.github.com/repos/alecthomas/chroma/languages","stargazers_url":"https://api.github.com/repos/alecthomas/chroma/stargazers","contributors_url":"https://api.github.com/repos/alecthomas/chroma/contributors","subscribers_url":"https://api.github.com/repos/alecthomas/chroma/subscribers","subscription_url":"https://api.github.com/repos/alecthomas/chroma/subscription","commits_url":"https://api.github.com/repos/alecthomas/chroma/commits{/sha}","git_commits_url":"https://api.github.com/repos/alecthomas/chroma/git/commits{/sha}","comments_url":"https://api.github.com/repos/alecthomas/chroma/comments{/number}","issue_comment_url":"https://api.github.com/repos/alecthomas/chroma/issues/comments{/number}","contents_url":"https://api.github.com/repos/alecthomas/chroma/contents/{+path}","compare_url":"https://api.github.com/repos/alecthomas/chroma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alecthomas/chroma/merges","archive_url":"https://api.github.com/repos/alecthomas/chroma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alecthomas/chroma/downloads","issues_url":"https://api.github.com/repos/alecthomas/chroma/issues{/number}","pulls_url":"https://api.github.com/repos/alecthomas/chroma/pulls{/number}","milestones_url":"https://api.github.com/repos/alecthomas/chroma/milestones{/number}","notifications_url":"https://api.github.com/repos/alecthomas/chroma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alecthomas/chroma/labels{/name}","releases_url":"https://api.github.com/repos/alecthomas/chroma/releases{/id}","deployments_url":"https://api.github.com/repos/alecthomas/chroma/deployments","created_at":"2017-06-07T09:47:08Z","updated_at":"2018-10-20T00:58:43Z","pushed_at":"2018-10-13T21:18:44Z","git_url":"git://github.com/alecthomas/chroma.git","ssh_url":"git@github.com:alecthomas/chroma.git","clone_url":"https://github.com/alecthomas/chroma.git","svn_url":"https://github.com/alecthomas/chroma","homepage":"","size":3834,"stargazers_count":1472,"watchers_count":1472,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":84,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":84,"open_issues":17,"watchers":1472,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alecthomas/chroma/pulls/186"},"html":{"href":"https://github.com/alecthomas/chroma/pull/186"},"issue":{"href":"https://api.github.com/repos/alecthomas/chroma/issues/186"},"comments":{"href":"https://api.github.com/repos/alecthomas/chroma/issues/186/comments"},"review_comments":{"href":"https://api.github.com/repos/alecthomas/chroma/pulls/186/comments"},"review_comment":{"href":"https://api.github.com/repos/alecthomas/chroma/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alecthomas/chroma/pulls/186/commits"},"statuses":{"href":"https://api.github.com/repos/alecthomas/chroma/statuses/6f498aa6d7f37921e09174e8cb6a9cecbb66ebf5"}},"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":1,"additions":78,"deletions":0,"changed_files":3}}
{"actor":{"display_login":"pedrosland"}}