{"action":"created","comment":{"url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls/comments/68839707","id":68839707,"diff_hunk":"@@ -109,14 +109,41 @@\n \t\t\t\t},\n \n \t\t\t\tonRender: function() {\n+\t\t\t\t\tfunction getCutOffIndex(elements, tagNames) {\n+\t\t\t\t\t\t// given an element path and an array of tag names to stop on,\n+\t\t\t\t\t\t// returns the earliest index of any of the tag names, or -1\n+\n+\t\t\t\t\t\tvar cutOffIndexes = [];\n+\t\t\t\t\t\tvar elementNames = elements.map(function(element) {\n+\t\t\t\t\t\t\treturn element.getName();\n+\t\t\t\t\t\t});\n+\n+\t\t\t\t\t\ttagNames.forEach(function(tagName, _, __) {\n+\t\t\t\t\t\t\tvar closestIndex = elementNames.indexOf(tagName);\n+\t\t\t\t\t\t\t// the tag name actually exists in the current element path\n+\t\t\t\t\t\t\tif (closestIndex !== -1) {\n+\t\t\t\t\t\t\t\tcutOffIndexes.push(closestIndex);\n+\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t});\n+\n+\t\t\t\t\t\tif (cutOffIndexes.length !== 0) {\n+\t\t\t\t\t\t\treturn Math.min.apply(null, cutOffIndexes);\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\telse {","path":"plugins/stylescombo/plugin.js","position":24,"original_position":24,"commit_id":"898a15862fa14b3d9b1702e28d34a416262c14e9","original_commit_id":"a850f2a12a1d064946d006b1a96471f5bbaf01b9","user":{"login":"kylegibson","id":243791,"avatar_url":"https://avatars.githubusercontent.com/u/243791?v=3","gravatar_id":"","url":"https://api.github.com/users/kylegibson","html_url":"https://github.com/kylegibson","followers_url":"https://api.github.com/users/kylegibson/followers","following_url":"https://api.github.com/users/kylegibson/following{/other_user}","gists_url":"https://api.github.com/users/kylegibson/gists{/gist_id}","starred_url":"https://api.github.com/users/kylegibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylegibson/subscriptions","organizations_url":"https://api.github.com/users/kylegibson/orgs","repos_url":"https://api.github.com/users/kylegibson/repos","events_url":"https://api.github.com/users/kylegibson/events{/privacy}","received_events_url":"https://api.github.com/users/kylegibson/received_events","type":"User","site_admin":false},"body":"Is this code styling preferred to `} else {` ?","created_at":"2016-06-28T20:45:52Z","updated_at":"2016-06-28T20:45:52Z","html_url":"https://github.com/PolicyStat/ckeditor-dev/pull/9#discussion_r68839707","pull_request_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls/comments/68839707"},"html":{"href":"https://github.com/PolicyStat/ckeditor-dev/pull/9#discussion_r68839707"},"pull_request":{"href":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls/9","id":75535717,"html_url":"https://github.com/PolicyStat/ckeditor-dev/pull/9","diff_url":"https://github.com/PolicyStat/ckeditor-dev/pull/9.diff","patch_url":"https://github.com/PolicyStat/ckeditor-dev/pull/9.patch","issue_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/issues/9","number":9,"state":"open","locked":false,"title":"List style reuse in lists ","user":{"login":"caffodian","id":2367533,"avatar_url":"https://avatars.githubusercontent.com/u/2367533?v=3","gravatar_id":"","url":"https://api.github.com/users/caffodian","html_url":"https://github.com/caffodian","followers_url":"https://api.github.com/users/caffodian/followers","following_url":"https://api.github.com/users/caffodian/following{/other_user}","gists_url":"https://api.github.com/users/caffodian/gists{/gist_id}","starred_url":"https://api.github.com/users/caffodian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caffodian/subscriptions","organizations_url":"https://api.github.com/users/caffodian/orgs","repos_url":"https://api.github.com/users/caffodian/repos","events_url":"https://api.github.com/users/caffodian/events{/privacy}","received_events_url":"https://api.github.com/users/caffodian/received_events","type":"User","site_admin":false},"body":"The previous \"fix\" for reuse of list styles assumed that if you were currently in a list item, you would want to check only the parent item for a style.\r\n\r\nHowever, other elements can also reside inside a list.\r\n\r\nFor the cases where the cursor is inside a list (whether it's further nested inside another element or not), stop the search for currently applied styles upon reaching the closest parent list.  ","created_at":"2016-06-28T19:27:57Z","updated_at":"2016-06-28T20:45:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf17f29421f41e5b5be8de1018d98104eb3ea97c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls/9/commits","review_comments_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls/9/comments","review_comment_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/issues/9/comments","statuses_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/statuses/898a15862fa14b3d9b1702e28d34a416262c14e9","head":{"label":"PolicyStat:reuse_list_styles","ref":"reuse_list_styles","sha":"898a15862fa14b3d9b1702e28d34a416262c14e9","user":{"login":"PolicyStat","id":149499,"avatar_url":"https://avatars.githubusercontent.com/u/149499?v=3","gravatar_id":"","url":"https://api.github.com/users/PolicyStat","html_url":"https://github.com/PolicyStat","followers_url":"https://api.github.com/users/PolicyStat/followers","following_url":"https://api.github.com/users/PolicyStat/following{/other_user}","gists_url":"https://api.github.com/users/PolicyStat/gists{/gist_id}","starred_url":"https://api.github.com/users/PolicyStat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolicyStat/subscriptions","organizations_url":"https://api.github.com/users/PolicyStat/orgs","repos_url":"https://api.github.com/users/PolicyStat/repos","events_url":"https://api.github.com/users/PolicyStat/events{/privacy}","received_events_url":"https://api.github.com/users/PolicyStat/received_events","type":"Organization","site_admin":false},"repo":{"id":51549518,"name":"ckeditor-dev","full_name":"PolicyStat/ckeditor-dev","owner":{"login":"PolicyStat","id":149499,"avatar_url":"https://avatars.githubusercontent.com/u/149499?v=3","gravatar_id":"","url":"https://api.github.com/users/PolicyStat","html_url":"https://github.com/PolicyStat","followers_url":"https://api.github.com/users/PolicyStat/followers","following_url":"https://api.github.com/users/PolicyStat/following{/other_user}","gists_url":"https://api.github.com/users/PolicyStat/gists{/gist_id}","starred_url":"https://api.github.com/users/PolicyStat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolicyStat/subscriptions","organizations_url":"https://api.github.com/users/PolicyStat/orgs","repos_url":"https://api.github.com/users/PolicyStat/repos","events_url":"https://api.github.com/users/PolicyStat/events{/privacy}","received_events_url":"https://api.github.com/users/PolicyStat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolicyStat/ckeditor-dev","description":"The development repository of CKEditor.","fork":true,"url":"https://api.github.com/repos/PolicyStat/ckeditor-dev","forks_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/forks","keys_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/teams","hooks_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/hooks","issue_events_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/issues/events{/number}","events_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/events","assignees_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/assignees{/user}","branches_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/branches{/branch}","tags_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/tags","blobs_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/languages","stargazers_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/stargazers","contributors_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/contributors","subscribers_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/subscribers","subscription_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/subscription","commits_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/contents/{+path}","compare_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/merges","archive_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/downloads","issues_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/issues{/number}","pulls_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/labels{/name}","releases_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/releases{/id}","deployments_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/deployments","created_at":"2016-02-11T21:48:38Z","updated_at":"2016-03-18T20:41:04Z","pushed_at":"2016-06-28T20:38:36Z","git_url":"git://github.com/PolicyStat/ckeditor-dev.git","ssh_url":"git@github.com:PolicyStat/ckeditor-dev.git","clone_url":"https://github.com/PolicyStat/ckeditor-dev.git","svn_url":"https://github.com/PolicyStat/ckeditor-dev","homepage":"http://ckeditor.com","size":35553,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"PolicyStat:pstat","ref":"pstat","sha":"d954965ceb5b6fbdecb4012789c192c04f6126ec","user":{"login":"PolicyStat","id":149499,"avatar_url":"https://avatars.githubusercontent.com/u/149499?v=3","gravatar_id":"","url":"https://api.github.com/users/PolicyStat","html_url":"https://github.com/PolicyStat","followers_url":"https://api.github.com/users/PolicyStat/followers","following_url":"https://api.github.com/users/PolicyStat/following{/other_user}","gists_url":"https://api.github.com/users/PolicyStat/gists{/gist_id}","starred_url":"https://api.github.com/users/PolicyStat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolicyStat/subscriptions","organizations_url":"https://api.github.com/users/PolicyStat/orgs","repos_url":"https://api.github.com/users/PolicyStat/repos","events_url":"https://api.github.com/users/PolicyStat/events{/privacy}","received_events_url":"https://api.github.com/users/PolicyStat/received_events","type":"Organization","site_admin":false},"repo":{"id":51549518,"name":"ckeditor-dev","full_name":"PolicyStat/ckeditor-dev","owner":{"login":"PolicyStat","id":149499,"avatar_url":"https://avatars.githubusercontent.com/u/149499?v=3","gravatar_id":"","url":"https://api.github.com/users/PolicyStat","html_url":"https://github.com/PolicyStat","followers_url":"https://api.github.com/users/PolicyStat/followers","following_url":"https://api.github.com/users/PolicyStat/following{/other_user}","gists_url":"https://api.github.com/users/PolicyStat/gists{/gist_id}","starred_url":"https://api.github.com/users/PolicyStat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolicyStat/subscriptions","organizations_url":"https://api.github.com/users/PolicyStat/orgs","repos_url":"https://api.github.com/users/PolicyStat/repos","events_url":"https://api.github.com/users/PolicyStat/events{/privacy}","received_events_url":"https://api.github.com/users/PolicyStat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolicyStat/ckeditor-dev","description":"The development repository of CKEditor.","fork":true,"url":"https://api.github.com/repos/PolicyStat/ckeditor-dev","forks_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/forks","keys_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/teams","hooks_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/hooks","issue_events_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/issues/events{/number}","events_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/events","assignees_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/assignees{/user}","branches_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/branches{/branch}","tags_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/tags","blobs_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/languages","stargazers_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/stargazers","contributors_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/contributors","subscribers_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/subscribers","subscription_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/subscription","commits_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/contents/{+path}","compare_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/merges","archive_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/downloads","issues_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/issues{/number}","pulls_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/labels{/name}","releases_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/releases{/id}","deployments_url":"https://api.github.com/repos/PolicyStat/ckeditor-dev/deployments","created_at":"2016-02-11T21:48:38Z","updated_at":"2016-03-18T20:41:04Z","pushed_at":"2016-06-28T20:38:36Z","git_url":"git://github.com/PolicyStat/ckeditor-dev.git","ssh_url":"git@github.com:PolicyStat/ckeditor-dev.git","clone_url":"https://github.com/PolicyStat/ckeditor-dev.git","svn_url":"https://github.com/PolicyStat/ckeditor-dev","homepage":"http://ckeditor.com","size":35553,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls/9"},"html":{"href":"https://github.com/PolicyStat/ckeditor-dev/pull/9"},"issue":{"href":"https://api.github.com/repos/PolicyStat/ckeditor-dev/issues/9"},"comments":{"href":"https://api.github.com/repos/PolicyStat/ckeditor-dev/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PolicyStat/ckeditor-dev/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/PolicyStat/ckeditor-dev/statuses/898a15862fa14b3d9b1702e28d34a416262c14e9"}}}}
{"actor":{"display_login":"kylegibson"}}