GitHub PullRequestReviewCommentEvent at 2014-07-21 09:22:26
Repository: html-janitor
Actor: theefer
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/guardian/html-janitor/pulls/comments/15160242","id":15160242,"diff_hunk":"@@ -65,6 +65,19 @@\n         break;\n       }\n \n+      // Support rewriting tag names\n+      if (typeof tagConfig === 'string') {\n+        var newNode = document.createElement(tagConfig);\n+        for (var i = 0; i < node.attributes.length; i++) {\n+          newNode.setAttribute(node.attributes[i].name, node.attributes[i].value);\n+        }\n+        newNode.innerHTML = node.innerHTML;","path":"src/html-janitor.js","position":19,"original_position":19,"commit_id":"b8706915bd647dc8ec5b475e0b030372ea235a2e","original_commit_id":"b8706915bd647dc8ec5b475e0b030372ea235a2e","user":{"login":"theefer","id":36964,"avatar_url":"https://avatars.githubusercontent.com/u/36964?","gravatar_id":"beea6c2e011b426ce59b6a0910f4354f","url":"https://api.github.com/users/theefer","html_url":"https://github.com/theefer","followers_url":"https://api.github.com/users/theefer/followers","following_url":"https://api.github.com/users/theefer/following{/other_user}","gists_url":"https://api.github.com/users/theefer/gists{/gist_id}","starred_url":"https://api.github.com/users/theefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theefer/subscriptions","organizations_url":"https://api.github.com/users/theefer/orgs","repos_url":"https://api.github.com/users/theefer/repos","events_url":"https://api.github.com/users/theefer/events{/privacy}","received_events_url":"https://api.github.com/users/theefer/received_events","type":"User","site_admin":false},"body":"Could you just copy the children over instead? That would remove the need for creating a new sub-DOM.\r\n\r\nIdeally we should share helpers for such things that have been done in other plugins (though harder as this is not formally part of Scribe).","created_at":"2014-07-21T09:22:26Z","updated_at":"2014-07-21T09:22:26Z","html_url":"https://github.com/guardian/html-janitor/pull/8#discussion_r15160242","pull_request_url":"https://api.github.com/repos/guardian/html-janitor/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/guardian/html-janitor/pulls/comments/15160242"},"html":{"href":"https://github.com/guardian/html-janitor/pull/8#discussion_r15160242"},"pull_request":{"href":"https://api.github.com/repos/guardian/html-janitor/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/html-janitor/pulls/8","id":18599036,"html_url":"https://github.com/guardian/html-janitor/pull/8","diff_url":"https://github.com/guardian/html-janitor/pull/8.diff","patch_url":"https://github.com/guardian/html-janitor/pull/8.patch","issue_url":"https://api.github.com/repos/guardian/html-janitor/issues/8","number":8,"state":"open","title":"Add tag rewriting","user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?","gravatar_id":"6d53507494cadf3a930696364e634992","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"body":"This is useful in case you'd like to rewrite some tags as you strip them.\r\n\r\nFor example, you might want to make headings of one type instead of completely stripping them.\r\nOr you might want to only support bullet lists.","created_at":"2014-07-18T17:46:55Z","updated_at":"2014-07-21T09:22:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ea9a1c0457cb78b4a68af7a10c3e0340c82a9cd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/html-janitor/pulls/8/commits","review_comments_url":"https://api.github.com/repos/guardian/html-janitor/pulls/8/comments","review_comment_url":"https://api.github.com/repos/guardian/html-janitor/pulls/comments/{number}","comments_url":"https://api.github.com/repos/guardian/html-janitor/issues/8/comments","statuses_url":"https://api.github.com/repos/guardian/html-janitor/statuses/b8706915bd647dc8ec5b475e0b030372ea235a2e","head":{"label":"gaearon:rewrite-tags","ref":"rewrite-tags","sha":"b8706915bd647dc8ec5b475e0b030372ea235a2e","user":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?","gravatar_id":"6d53507494cadf3a930696364e634992","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"repo":{"id":21988973,"name":"html-janitor","full_name":"gaearon/html-janitor","owner":{"login":"gaearon","id":810438,"avatar_url":"https://avatars.githubusercontent.com/u/810438?","gravatar_id":"6d53507494cadf3a930696364e634992","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gaearon/html-janitor","description":"Sanitises HTML","fork":true,"url":"https://api.github.com/repos/gaearon/html-janitor","forks_url":"https://api.github.com/repos/gaearon/html-janitor/forks","keys_url":"https://api.github.com/repos/gaearon/html-janitor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gaearon/html-janitor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gaearon/html-janitor/teams","hooks_url":"https://api.github.com/repos/gaearon/html-janitor/hooks","issue_events_url":"https://api.github.com/repos/gaearon/html-janitor/issues/events{/number}","events_url":"https://api.github.com/repos/gaearon/html-janitor/events","assignees_url":"https://api.github.com/repos/gaearon/html-janitor/assignees{/user}","branches_url":"https://api.github.com/repos/gaearon/html-janitor/branches{/branch}","tags_url":"https://api.github.com/repos/gaearon/html-janitor/tags","blobs_url":"https://api.github.com/repos/gaearon/html-janitor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gaearon/html-janitor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gaearon/html-janitor/git/refs{/sha}","trees_url":"https://api.github.com/repos/gaearon/html-janitor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gaearon/html-janitor/statuses/{sha}","languages_url":"https://api.github.com/repos/gaearon/html-janitor/languages","stargazers_url":"https://api.github.com/repos/gaearon/html-janitor/stargazers","contributors_url":"https://api.github.com/repos/gaearon/html-janitor/contributors","subscribers_url":"https://api.github.com/repos/gaearon/html-janitor/subscribers","subscription_url":"https://api.github.com/repos/gaearon/html-janitor/subscription","commits_url":"https://api.github.com/repos/gaearon/html-janitor/commits{/sha}","git_commits_url":"https://api.github.com/repos/gaearon/html-janitor/git/commits{/sha}","comments_url":"https://api.github.com/repos/gaearon/html-janitor/comments{/number}","issue_comment_url":"https://api.github.com/repos/gaearon/html-janitor/issues/comments/{number}","contents_url":"https://api.github.com/repos/gaearon/html-janitor/contents/{+path}","compare_url":"https://api.github.com/repos/gaearon/html-janitor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gaearon/html-janitor/merges","archive_url":"https://api.github.com/repos/gaearon/html-janitor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gaearon/html-janitor/downloads","issues_url":"https://api.github.com/repos/gaearon/html-janitor/issues{/number}","pulls_url":"https://api.github.com/repos/gaearon/html-janitor/pulls{/number}","milestones_url":"https://api.github.com/repos/gaearon/html-janitor/milestones{/number}","notifications_url":"https://api.github.com/repos/gaearon/html-janitor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gaearon/html-janitor/labels{/name}","releases_url":"https://api.github.com/repos/gaearon/html-janitor/releases{/id}","created_at":"2014-07-18T17:43:32Z","updated_at":"2014-07-18T18:41:39Z","pushed_at":"2014-07-18T18:41:39Z","git_url":"git://github.com/gaearon/html-janitor.git","ssh_url":"git@github.com:gaearon/html-janitor.git","clone_url":"https://github.com/gaearon/html-janitor.git","svn_url":"https://github.com/gaearon/html-janitor","homepage":null,"size":220,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"3a64b3ba31910d841a0e658b690c57ced217dec8","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?","gravatar_id":"2ddf2e74b78084fcf451b3cdeb075e73","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":16278638,"name":"html-janitor","full_name":"guardian/html-janitor","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?","gravatar_id":"2ddf2e74b78084fcf451b3cdeb075e73","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/html-janitor","description":"Sanitises HTML","fork":false,"url":"https://api.github.com/repos/guardian/html-janitor","forks_url":"https://api.github.com/repos/guardian/html-janitor/forks","keys_url":"https://api.github.com/repos/guardian/html-janitor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/html-janitor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/html-janitor/teams","hooks_url":"https://api.github.com/repos/guardian/html-janitor/hooks","issue_events_url":"https://api.github.com/repos/guardian/html-janitor/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/html-janitor/events","assignees_url":"https://api.github.com/repos/guardian/html-janitor/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/html-janitor/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/html-janitor/tags","blobs_url":"https://api.github.com/repos/guardian/html-janitor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/html-janitor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/html-janitor/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/html-janitor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/html-janitor/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/html-janitor/languages","stargazers_url":"https://api.github.com/repos/guardian/html-janitor/stargazers","contributors_url":"https://api.github.com/repos/guardian/html-janitor/contributors","subscribers_url":"https://api.github.com/repos/guardian/html-janitor/subscribers","subscription_url":"https://api.github.com/repos/guardian/html-janitor/subscription","commits_url":"https://api.github.com/repos/guardian/html-janitor/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/html-janitor/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/html-janitor/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/html-janitor/issues/comments/{number}","contents_url":"https://api.github.com/repos/guardian/html-janitor/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/html-janitor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/html-janitor/merges","archive_url":"https://api.github.com/repos/guardian/html-janitor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/html-janitor/downloads","issues_url":"https://api.github.com/repos/guardian/html-janitor/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/html-janitor/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/html-janitor/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/html-janitor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/html-janitor/labels{/name}","releases_url":"https://api.github.com/repos/guardian/html-janitor/releases{/id}","created_at":"2014-01-27T12:39:46Z","updated_at":"2014-05-31T18:19:23Z","pushed_at":"2014-05-30T09:17:53Z","git_url":"git://github.com/guardian/html-janitor.git","ssh_url":"git@github.com:guardian/html-janitor.git","clone_url":"https://github.com/guardian/html-janitor.git","svn_url":"https://github.com/guardian/html-janitor","homepage":null,"size":380,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/html-janitor/pulls/8"},"html":{"href":"https://github.com/guardian/html-janitor/pull/8"},"issue":{"href":"https://api.github.com/repos/guardian/html-janitor/issues/8"},"comments":{"href":"https://api.github.com/repos/guardian/html-janitor/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/html-janitor/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/html-janitor/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/guardian/html-janitor/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/html-janitor/statuses/b8706915bd647dc8ec5b475e0b030372ea235a2e"}}}}