{"action":"created","comment":{"url":"https://api.github.com/repos/livingdocsIO/editable.js/pulls/comments/321261749","pull_request_review_id":284260379,"id":321261749,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyMTI2MTc0OQ==","diff_hunk":"@@ -144,11 +144,16 @@ describe('Clipboard', () => {\n       expect(parseContent(div)[0]).toEqual('bar')\n     })\n \n-    it('keeps internal links of a anchorTag with an href attribute', () => {\n-      expect(extractSingleBlock('<a href=\"http://localhost:9876/test123\">a</a>')).toEqual('<a href=\"http://localhost:9876/test123\">a</a>')\n+    it('changes absolute links to relative ones with the keepInternalRelativeLinks flag set to true', () => {\n       config.pastedHtmlRules.keepInternalRelativeLinks = true\n       updateConfig(config)","path":"spec/clipboard.spec.js","position":14,"original_position":8,"commit_id":"ccf22495568af8bea428dc11671bc67fc1837e20","original_commit_id":"ccf22495568af8bea428dc11671bc67fc1837e20","user":{"login":"peyerluk","id":47606,"node_id":"MDQ6VXNlcjQ3NjA2","avatar_url":"https://avatars1.githubusercontent.com/u/47606?v=4","gravatar_id":"","url":"https://api.github.com/users/peyerluk","html_url":"https://github.com/peyerluk","followers_url":"https://api.github.com/users/peyerluk/followers","following_url":"https://api.github.com/users/peyerluk/following{/other_user}","gists_url":"https://api.github.com/users/peyerluk/gists{/gist_id}","starred_url":"https://api.github.com/users/peyerluk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peyerluk/subscriptions","organizations_url":"https://api.github.com/users/peyerluk/orgs","repos_url":"https://api.github.com/users/peyerluk/repos","events_url":"https://api.github.com/users/peyerluk/events{/privacy}","received_events_url":"https://api.github.com/users/peyerluk/received_events","type":"User","site_admin":false},"body":"Each test should restore the config to the state before. Or is that already done somewhere?","created_at":"2019-09-05T13:29:12Z","updated_at":"2019-09-05T13:29:12Z","html_url":"https://github.com/livingdocsIO/editable.js/pull/169#discussion_r321261749","pull_request_url":"https://api.github.com/repos/livingdocsIO/editable.js/pulls/169","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/livingdocsIO/editable.js/pulls/comments/321261749"},"html":{"href":"https://github.com/livingdocsIO/editable.js/pull/169#discussion_r321261749"},"pull_request":{"href":"https://api.github.com/repos/livingdocsIO/editable.js/pulls/169"}}},"pull_request":{"url":"https://api.github.com/repos/livingdocsIO/editable.js/pulls/169","id":314113248,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE0MTEzMjQ4","html_url":"https://github.com/livingdocsIO/editable.js/pull/169","diff_url":"https://github.com/livingdocsIO/editable.js/pull/169.diff","patch_url":"https://github.com/livingdocsIO/editable.js/pull/169.patch","issue_url":"https://api.github.com/repos/livingdocsIO/editable.js/issues/169","number":169,"state":"open","locked":false,"title":"Clipboard: Copy&Paste keeps links relative","user":{"login":"mokimo","id":39759830,"node_id":"MDQ6VXNlcjM5NzU5ODMw","avatar_url":"https://avatars1.githubusercontent.com/u/39759830?v=4","gravatar_id":"","url":"https://api.github.com/users/mokimo","html_url":"https://github.com/mokimo","followers_url":"https://api.github.com/users/mokimo/followers","following_url":"https://api.github.com/users/mokimo/following{/other_user}","gists_url":"https://api.github.com/users/mokimo/gists{/gist_id}","starred_url":"https://api.github.com/users/mokimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mokimo/subscriptions","organizations_url":"https://api.github.com/users/mokimo/orgs","repos_url":"https://api.github.com/users/mokimo/repos","events_url":"https://api.github.com/users/mokimo/events{/privacy}","received_events_url":"https://api.github.com/users/mokimo/received_events","type":"User","site_admin":false},"body":"Relations:\r\n  - Issue: https://github.com/livingdocsIO/livingdocs-planning/issues/2965\r\n\r\n## Description\r\nThe clipboard turns relative links into absolute ones so:\r\n`/internal/link` gets converted to `https://livingdocs.io/internal/link`\r\n\r\nThere is a new flag to turn off this behavior if the link was copied from the same context/host editable is running on.\r\n\r\nSo if a relative link was copied from `https://livingdocs.io/internal/link` it strips off the protocol, hostname and port number of a URL and turns it to `/internal/link`\r\nIf a relative link was copied from `https://somewebpage.com/internal/link` it will still convert it to an absolute one.\r\n\r\n## Changelog\r\n- new config option\r\n```js\r\nEditable.globalConfig({\r\n pastedHtmlRules: {\r\n  keepInternalRelativeLinks: true || false // default false\r\n }\r\n}\r\n```\r\n\r\n## Test Instructions\r\nCreate an article.\r\nAdd a text with a relative link like /link.\r\nCopy the text and past to another component.\r\nCheck the link.","created_at":"2019-09-04T16:04:30Z","updated_at":"2019-09-05T13:29:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5805462ba37658a7701801b950b24e7b8cd198ad","assignee":{"login":"mokimo","id":39759830,"node_id":"MDQ6VXNlcjM5NzU5ODMw","avatar_url":"https://avatars1.githubusercontent.com/u/39759830?v=4","gravatar_id":"","url":"https://api.github.com/users/mokimo","html_url":"https://github.com/mokimo","followers_url":"https://api.github.com/users/mokimo/followers","following_url":"https://api.github.com/users/mokimo/following{/other_user}","gists_url":"https://api.github.com/users/mokimo/gists{/gist_id}","starred_url":"https://api.github.com/users/mokimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mokimo/subscriptions","organizations_url":"https://api.github.com/users/mokimo/orgs","repos_url":"https://api.github.com/users/mokimo/repos","events_url":"https://api.github.com/users/mokimo/events{/privacy}","received_events_url":"https://api.github.com/users/mokimo/received_events","type":"User","site_admin":false},"assignees":[{"login":"mokimo","id":39759830,"node_id":"MDQ6VXNlcjM5NzU5ODMw","avatar_url":"https://avatars1.githubusercontent.com/u/39759830?v=4","gravatar_id":"","url":"https://api.github.com/users/mokimo","html_url":"https://github.com/mokimo","followers_url":"https://api.github.com/users/mokimo/followers","following_url":"https://api.github.com/users/mokimo/following{/other_user}","gists_url":"https://api.github.com/users/mokimo/gists{/gist_id}","starred_url":"https://api.github.com/users/mokimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mokimo/subscriptions","organizations_url":"https://api.github.com/users/mokimo/orgs","repos_url":"https://api.github.com/users/mokimo/repos","events_url":"https://api.github.com/users/mokimo/events{/privacy}","received_events_url":"https://api.github.com/users/mokimo/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/livingdocsIO/editable.js/pulls/169/commits","review_comments_url":"https://api.github.com/repos/livingdocsIO/editable.js/pulls/169/comments","review_comment_url":"https://api.github.com/repos/livingdocsIO/editable.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/livingdocsIO/editable.js/issues/169/comments","statuses_url":"https://api.github.com/repos/livingdocsIO/editable.js/statuses/ccf22495568af8bea428dc11671bc67fc1837e20","head":{"label":"livingdocsIO:keep-links-internal","ref":"keep-links-internal","sha":"ccf22495568af8bea428dc11671bc67fc1837e20","user":{"login":"livingdocsIO","id":3775168,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NzUxNjg=","avatar_url":"https://avatars2.githubusercontent.com/u/3775168?v=4","gravatar_id":"","url":"https://api.github.com/users/livingdocsIO","html_url":"https://github.com/livingdocsIO","followers_url":"https://api.github.com/users/livingdocsIO/followers","following_url":"https://api.github.com/users/livingdocsIO/following{/other_user}","gists_url":"https://api.github.com/users/livingdocsIO/gists{/gist_id}","starred_url":"https://api.github.com/users/livingdocsIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livingdocsIO/subscriptions","organizations_url":"https://api.github.com/users/livingdocsIO/orgs","repos_url":"https://api.github.com/users/livingdocsIO/repos","events_url":"https://api.github.com/users/livingdocsIO/events{/privacy}","received_events_url":"https://api.github.com/users/livingdocsIO/received_events","type":"Organization","site_admin":false},"repo":{"id":8882447,"node_id":"MDEwOlJlcG9zaXRvcnk4ODgyNDQ3","name":"editable.js","full_name":"livingdocsIO/editable.js","private":false,"owner":{"login":"livingdocsIO","id":3775168,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NzUxNjg=","avatar_url":"https://avatars2.githubusercontent.com/u/3775168?v=4","gravatar_id":"","url":"https://api.github.com/users/livingdocsIO","html_url":"https://github.com/livingdocsIO","followers_url":"https://api.github.com/users/livingdocsIO/followers","following_url":"https://api.github.com/users/livingdocsIO/following{/other_user}","gists_url":"https://api.github.com/users/livingdocsIO/gists{/gist_id}","starred_url":"https://api.github.com/users/livingdocsIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livingdocsIO/subscriptions","organizations_url":"https://api.github.com/users/livingdocsIO/orgs","repos_url":"https://api.github.com/users/livingdocsIO/repos","events_url":"https://api.github.com/users/livingdocsIO/events{/privacy}","received_events_url":"https://api.github.com/users/livingdocsIO/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/livingdocsIO/editable.js","description":"Friendly contenteditable API","fork":false,"url":"https://api.github.com/repos/livingdocsIO/editable.js","forks_url":"https://api.github.com/repos/livingdocsIO/editable.js/forks","keys_url":"https://api.github.com/repos/livingdocsIO/editable.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/livingdocsIO/editable.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/livingdocsIO/editable.js/teams","hooks_url":"https://api.github.com/repos/livingdocsIO/editable.js/hooks","issue_events_url":"https://api.github.com/repos/livingdocsIO/editable.js/issues/events{/number}","events_url":"https://api.github.com/repos/livingdocsIO/editable.js/events","assignees_url":"https://api.github.com/repos/livingdocsIO/editable.js/assignees{/user}","branches_url":"https://api.github.com/repos/livingdocsIO/editable.js/branches{/branch}","tags_url":"https://api.github.com/repos/livingdocsIO/editable.js/tags","blobs_url":"https://api.github.com/repos/livingdocsIO/editable.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/livingdocsIO/editable.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/livingdocsIO/editable.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/livingdocsIO/editable.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/livingdocsIO/editable.js/statuses/{sha}","languages_url":"https://api.github.com/repos/livingdocsIO/editable.js/languages","stargazers_url":"https://api.github.com/repos/livingdocsIO/editable.js/stargazers","contributors_url":"https://api.github.com/repos/livingdocsIO/editable.js/contributors","subscribers_url":"https://api.github.com/repos/livingdocsIO/editable.js/subscribers","subscription_url":"https://api.github.com/repos/livingdocsIO/editable.js/subscription","commits_url":"https://api.github.com/repos/livingdocsIO/editable.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/livingdocsIO/editable.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/livingdocsIO/editable.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/livingdocsIO/editable.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/livingdocsIO/editable.js/contents/{+path}","compare_url":"https://api.github.com/repos/livingdocsIO/editable.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/livingdocsIO/editable.js/merges","archive_url":"https://api.github.com/repos/livingdocsIO/editable.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/livingdocsIO/editable.js/downloads","issues_url":"https://api.github.com/repos/livingdocsIO/editable.js/issues{/number}","pulls_url":"https://api.github.com/repos/livingdocsIO/editable.js/pulls{/number}","milestones_url":"https://api.github.com/repos/livingdocsIO/editable.js/milestones{/number}","notifications_url":"https://api.github.com/repos/livingdocsIO/editable.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/livingdocsIO/editable.js/labels{/name}","releases_url":"https://api.github.com/repos/livingdocsIO/editable.js/releases{/id}","deployments_url":"https://api.github.com/repos/livingdocsIO/editable.js/deployments","created_at":"2013-03-19T15:52:01Z","updated_at":"2019-09-04T13:30:39Z","pushed_at":"2019-09-04T16:15:37Z","git_url":"git://github.com/livingdocsIO/editable.js.git","ssh_url":"git@github.com:livingdocsIO/editable.js.git","clone_url":"https://github.com/livingdocsIO/editable.js.git","svn_url":"https://github.com/livingdocsIO/editable.js","homepage":"http://livingdocsio.github.io/editable.js","size":10386,"stargazers_count":98,"watchers_count":98,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":12,"open_issues":18,"watchers":98,"default_branch":"master"}},"base":{"label":"livingdocsIO:master","ref":"master","sha":"ef1e8a6ead9347ea1933af00cdc6f7bd55dfc868","user":{"login":"livingdocsIO","id":3775168,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NzUxNjg=","avatar_url":"https://avatars2.githubusercontent.com/u/3775168?v=4","gravatar_id":"","url":"https://api.github.com/users/livingdocsIO","html_url":"https://github.com/livingdocsIO","followers_url":"https://api.github.com/users/livingdocsIO/followers","following_url":"https://api.github.com/users/livingdocsIO/following{/other_user}","gists_url":"https://api.github.com/users/livingdocsIO/gists{/gist_id}","starred_url":"https://api.github.com/users/livingdocsIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livingdocsIO/subscriptions","organizations_url":"https://api.github.com/users/livingdocsIO/orgs","repos_url":"https://api.github.com/users/livingdocsIO/repos","events_url":"https://api.github.com/users/livingdocsIO/events{/privacy}","received_events_url":"https://api.github.com/users/livingdocsIO/received_events","type":"Organization","site_admin":false},"repo":{"id":8882447,"node_id":"MDEwOlJlcG9zaXRvcnk4ODgyNDQ3","name":"editable.js","full_name":"livingdocsIO/editable.js","private":false,"owner":{"login":"livingdocsIO","id":3775168,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3NzUxNjg=","avatar_url":"https://avatars2.githubusercontent.com/u/3775168?v=4","gravatar_id":"","url":"https://api.github.com/users/livingdocsIO","html_url":"https://github.com/livingdocsIO","followers_url":"https://api.github.com/users/livingdocsIO/followers","following_url":"https://api.github.com/users/livingdocsIO/following{/other_user}","gists_url":"https://api.github.com/users/livingdocsIO/gists{/gist_id}","starred_url":"https://api.github.com/users/livingdocsIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livingdocsIO/subscriptions","organizations_url":"https://api.github.com/users/livingdocsIO/orgs","repos_url":"https://api.github.com/users/livingdocsIO/repos","events_url":"https://api.github.com/users/livingdocsIO/events{/privacy}","received_events_url":"https://api.github.com/users/livingdocsIO/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/livingdocsIO/editable.js","description":"Friendly contenteditable API","fork":false,"url":"https://api.github.com/repos/livingdocsIO/editable.js","forks_url":"https://api.github.com/repos/livingdocsIO/editable.js/forks","keys_url":"https://api.github.com/repos/livingdocsIO/editable.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/livingdocsIO/editable.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/livingdocsIO/editable.js/teams","hooks_url":"https://api.github.com/repos/livingdocsIO/editable.js/hooks","issue_events_url":"https://api.github.com/repos/livingdocsIO/editable.js/issues/events{/number}","events_url":"https://api.github.com/repos/livingdocsIO/editable.js/events","assignees_url":"https://api.github.com/repos/livingdocsIO/editable.js/assignees{/user}","branches_url":"https://api.github.com/repos/livingdocsIO/editable.js/branches{/branch}","tags_url":"https://api.github.com/repos/livingdocsIO/editable.js/tags","blobs_url":"https://api.github.com/repos/livingdocsIO/editable.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/livingdocsIO/editable.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/livingdocsIO/editable.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/livingdocsIO/editable.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/livingdocsIO/editable.js/statuses/{sha}","languages_url":"https://api.github.com/repos/livingdocsIO/editable.js/languages","stargazers_url":"https://api.github.com/repos/livingdocsIO/editable.js/stargazers","contributors_url":"https://api.github.com/repos/livingdocsIO/editable.js/contributors","subscribers_url":"https://api.github.com/repos/livingdocsIO/editable.js/subscribers","subscription_url":"https://api.github.com/repos/livingdocsIO/editable.js/subscription","commits_url":"https://api.github.com/repos/livingdocsIO/editable.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/livingdocsIO/editable.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/livingdocsIO/editable.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/livingdocsIO/editable.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/livingdocsIO/editable.js/contents/{+path}","compare_url":"https://api.github.com/repos/livingdocsIO/editable.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/livingdocsIO/editable.js/merges","archive_url":"https://api.github.com/repos/livingdocsIO/editable.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/livingdocsIO/editable.js/downloads","issues_url":"https://api.github.com/repos/livingdocsIO/editable.js/issues{/number}","pulls_url":"https://api.github.com/repos/livingdocsIO/editable.js/pulls{/number}","milestones_url":"https://api.github.com/repos/livingdocsIO/editable.js/milestones{/number}","notifications_url":"https://api.github.com/repos/livingdocsIO/editable.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/livingdocsIO/editable.js/labels{/name}","releases_url":"https://api.github.com/repos/livingdocsIO/editable.js/releases{/id}","deployments_url":"https://api.github.com/repos/livingdocsIO/editable.js/deployments","created_at":"2013-03-19T15:52:01Z","updated_at":"2019-09-04T13:30:39Z","pushed_at":"2019-09-04T16:15:37Z","git_url":"git://github.com/livingdocsIO/editable.js.git","ssh_url":"git@github.com:livingdocsIO/editable.js.git","clone_url":"https://github.com/livingdocsIO/editable.js.git","svn_url":"https://github.com/livingdocsIO/editable.js","homepage":"http://livingdocsio.github.io/editable.js","size":10386,"stargazers_count":98,"watchers_count":98,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":12,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":12,"open_issues":18,"watchers":98,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/livingdocsIO/editable.js/pulls/169"},"html":{"href":"https://github.com/livingdocsIO/editable.js/pull/169"},"issue":{"href":"https://api.github.com/repos/livingdocsIO/editable.js/issues/169"},"comments":{"href":"https://api.github.com/repos/livingdocsIO/editable.js/issues/169/comments"},"review_comments":{"href":"https://api.github.com/repos/livingdocsIO/editable.js/pulls/169/comments"},"review_comment":{"href":"https://api.github.com/repos/livingdocsIO/editable.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/livingdocsIO/editable.js/pulls/169/commits"},"statuses":{"href":"https://api.github.com/repos/livingdocsIO/editable.js/statuses/ccf22495568af8bea428dc11671bc67fc1837e20"}},"author_association":"NONE"}}
{"actor":{"display_login":"peyerluk"}}