{"action":"created","comment":{"url":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls/comments/59118529","id":59118529,"diff_hunk":"@@ -197,6 +205,157 @@ test('unknown element type', t => {\n   t.deepEqual(apn.components, []);\n });\n \n+test('embeds', t => {\n+  const data = {\n+    title: 'embeds',\n+    body: [\n+      {\n+        type: 'embed',\n+        embedType: 'instagram',\n+        id: 'BDvcE47g6Ed',\n+        caption: [\n+          { type: 'text', href: 'http://mic.com', content: 'link' },\n+          { type: 'linebreak' },\n+          { type: 'text', content: 'normal text ' },\n+          { type: 'text', bold: true, content: 'bold text ' },\n+          { type: 'text', italic: true, content: 'italic text ' },\n+          { type: 'text', bold: true, italic: true, content: 'bold italic text ' },\n+          { type: 'text', mark: true, content: 'marked text' },\n+          { type: 'text', mark: true, markClass: 'marker1' }\n+        ]\n+      },\n+      {\n+        type: 'embed',\n+        embedType: 'twitter',\n+        url: 'https://twitter.com/randal_olson/status/709090467821064196',\n+        caption: [\n+          { type: 'text', href: 'http://mic.com', content: 'link' },\n+          { type: 'linebreak' },\n+          { type: 'text', content: 'normal text ' },\n+          { type: 'text', bold: true, content: 'bold text ' },\n+          { type: 'text', italic: true, content: 'italic text ' },\n+          { type: 'text', bold: true, italic: true, content: 'bold italic text ' },\n+          { type: 'text', mark: true, content: 'marked text' },\n+          { type: 'text', mark: true, markClass: 'marker1' }\n+        ]\n+      },\n+      {\n+        type: 'embed',\n+        embedType: 'youtube',\n+        youtubeId: 'oo6D4MXrJ5c',\n+        caption: [\n+          { type: 'text', href: 'http://mic.com', content: 'link' },\n+          { type: 'linebreak' },\n+          { type: 'text', content: 'normal text ' },\n+          { type: 'text', bold: true, content: 'bold text ' },\n+          { type: 'text', italic: true, content: 'italic text ' },\n+          { type: 'text', bold: true, italic: true, content: 'bold italic text ' },\n+          { type: 'text', mark: true, content: 'marked text' },\n+          { type: 'text', mark: true, markClass: 'marker1' }\n+        ]\n+      },\n+      {\n+        type: 'embed',\n+        embedType: 'image',\n+        url: 'bundle://image.jpg',","path":"test/index.js","position":91,"original_position":91,"commit_id":"5e01c09d434984be69c7c34703ad0ad5e3386fc3","original_commit_id":"5e01c09d434984be69c7c34703ad0ad5e3386fc3","user":{"login":"iefserge","id":6034700,"avatar_url":"https://avatars.githubusercontent.com/u/6034700?v=3","gravatar_id":"","url":"https://api.github.com/users/iefserge","html_url":"https://github.com/iefserge","followers_url":"https://api.github.com/users/iefserge/followers","following_url":"https://api.github.com/users/iefserge/following{/other_user}","gists_url":"https://api.github.com/users/iefserge/gists{/gist_id}","starred_url":"https://api.github.com/users/iefserge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iefserge/subscriptions","organizations_url":"https://api.github.com/users/iefserge/orgs","repos_url":"https://api.github.com/users/iefserge/repos","events_url":"https://api.github.com/users/iefserge/events{/privacy}","received_events_url":"https://api.github.com/users/iefserge/received_events","type":"User","site_admin":false},"body":"@kesla I think we can't link to external images at all, so all image embeds need to be bundled.","created_at":"2016-04-09T17:44:46Z","updated_at":"2016-04-09T17:44:46Z","html_url":"https://github.com/micnews/article-json-to-apple-news/pull/3#discussion_r59118529","pull_request_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls/comments/59118529"},"html":{"href":"https://github.com/micnews/article-json-to-apple-news/pull/3#discussion_r59118529"},"pull_request":{"href":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls/3","id":65884985,"html_url":"https://github.com/micnews/article-json-to-apple-news/pull/3","diff_url":"https://github.com/micnews/article-json-to-apple-news/pull/3.diff","patch_url":"https://github.com/micnews/article-json-to-apple-news/pull/3.patch","issue_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/issues/3","number":3,"state":"open","locked":false,"title":"Support embeds","user":{"login":"kesla","id":74128,"avatar_url":"https://avatars.githubusercontent.com/u/74128?v=3","gravatar_id":"","url":"https://api.github.com/users/kesla","html_url":"https://github.com/kesla","followers_url":"https://api.github.com/users/kesla/followers","following_url":"https://api.github.com/users/kesla/following{/other_user}","gists_url":"https://api.github.com/users/kesla/gists{/gist_id}","starred_url":"https://api.github.com/users/kesla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kesla/subscriptions","organizations_url":"https://api.github.com/users/kesla/orgs","repos_url":"https://api.github.com/users/kesla/repos","events_url":"https://api.github.com/users/kesla/events{/privacy}","received_events_url":"https://api.github.com/users/kesla/received_events","type":"User","site_admin":false},"body":"Add support for youtube, image, instagram, twitter\n\nR = @iefserge","created_at":"2016-04-09T16:11:13Z","updated_at":"2016-04-09T17:44:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afb05536f106de311ad98dd0a5edaa13b523cb70","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls/3/commits","review_comments_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls/3/comments","review_comment_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls/comments{/number}","comments_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/issues/3/comments","statuses_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/statuses/5e01c09d434984be69c7c34703ad0ad5e3386fc3","head":{"label":"micnews:embeds","ref":"embeds","sha":"5e01c09d434984be69c7c34703ad0ad5e3386fc3","user":{"login":"micnews","id":7944468,"avatar_url":"https://avatars.githubusercontent.com/u/7944468?v=3","gravatar_id":"","url":"https://api.github.com/users/micnews","html_url":"https://github.com/micnews","followers_url":"https://api.github.com/users/micnews/followers","following_url":"https://api.github.com/users/micnews/following{/other_user}","gists_url":"https://api.github.com/users/micnews/gists{/gist_id}","starred_url":"https://api.github.com/users/micnews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micnews/subscriptions","organizations_url":"https://api.github.com/users/micnews/orgs","repos_url":"https://api.github.com/users/micnews/repos","events_url":"https://api.github.com/users/micnews/events{/privacy}","received_events_url":"https://api.github.com/users/micnews/received_events","type":"Organization","site_admin":false},"repo":{"id":55615438,"name":"article-json-to-apple-news","full_name":"micnews/article-json-to-apple-news","owner":{"login":"micnews","id":7944468,"avatar_url":"https://avatars.githubusercontent.com/u/7944468?v=3","gravatar_id":"","url":"https://api.github.com/users/micnews","html_url":"https://github.com/micnews","followers_url":"https://api.github.com/users/micnews/followers","following_url":"https://api.github.com/users/micnews/following{/other_user}","gists_url":"https://api.github.com/users/micnews/gists{/gist_id}","starred_url":"https://api.github.com/users/micnews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micnews/subscriptions","organizations_url":"https://api.github.com/users/micnews/orgs","repos_url":"https://api.github.com/users/micnews/repos","events_url":"https://api.github.com/users/micnews/events{/privacy}","received_events_url":"https://api.github.com/users/micnews/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/micnews/article-json-to-apple-news","description":"Render article JSON in the Apple News format","fork":false,"url":"https://api.github.com/repos/micnews/article-json-to-apple-news","forks_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/forks","keys_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/teams","hooks_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/hooks","issue_events_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/issues/events{/number}","events_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/events","assignees_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/assignees{/user}","branches_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/branches{/branch}","tags_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/tags","blobs_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/git/refs{/sha}","trees_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/statuses/{sha}","languages_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/languages","stargazers_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/stargazers","contributors_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/contributors","subscribers_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/subscribers","subscription_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/subscription","commits_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/commits{/sha}","git_commits_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/git/commits{/sha}","comments_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/comments{/number}","issue_comment_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/issues/comments{/number}","contents_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/contents/{+path}","compare_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/merges","archive_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/downloads","issues_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/issues{/number}","pulls_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls{/number}","milestones_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/milestones{/number}","notifications_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/labels{/name}","releases_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/releases{/id}","deployments_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/deployments","created_at":"2016-04-06T15:00:42Z","updated_at":"2016-04-09T17:40:24Z","pushed_at":"2016-04-09T16:14:07Z","git_url":"git://github.com/micnews/article-json-to-apple-news.git","ssh_url":"git@github.com:micnews/article-json-to-apple-news.git","clone_url":"https://github.com/micnews/article-json-to-apple-news.git","svn_url":"https://github.com/micnews/article-json-to-apple-news","homepage":null,"size":55,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"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":"micnews:master","ref":"master","sha":"08f23b702004ee517c63cb440135a16888c0d69d","user":{"login":"micnews","id":7944468,"avatar_url":"https://avatars.githubusercontent.com/u/7944468?v=3","gravatar_id":"","url":"https://api.github.com/users/micnews","html_url":"https://github.com/micnews","followers_url":"https://api.github.com/users/micnews/followers","following_url":"https://api.github.com/users/micnews/following{/other_user}","gists_url":"https://api.github.com/users/micnews/gists{/gist_id}","starred_url":"https://api.github.com/users/micnews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micnews/subscriptions","organizations_url":"https://api.github.com/users/micnews/orgs","repos_url":"https://api.github.com/users/micnews/repos","events_url":"https://api.github.com/users/micnews/events{/privacy}","received_events_url":"https://api.github.com/users/micnews/received_events","type":"Organization","site_admin":false},"repo":{"id":55615438,"name":"article-json-to-apple-news","full_name":"micnews/article-json-to-apple-news","owner":{"login":"micnews","id":7944468,"avatar_url":"https://avatars.githubusercontent.com/u/7944468?v=3","gravatar_id":"","url":"https://api.github.com/users/micnews","html_url":"https://github.com/micnews","followers_url":"https://api.github.com/users/micnews/followers","following_url":"https://api.github.com/users/micnews/following{/other_user}","gists_url":"https://api.github.com/users/micnews/gists{/gist_id}","starred_url":"https://api.github.com/users/micnews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micnews/subscriptions","organizations_url":"https://api.github.com/users/micnews/orgs","repos_url":"https://api.github.com/users/micnews/repos","events_url":"https://api.github.com/users/micnews/events{/privacy}","received_events_url":"https://api.github.com/users/micnews/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/micnews/article-json-to-apple-news","description":"Render article JSON in the Apple News format","fork":false,"url":"https://api.github.com/repos/micnews/article-json-to-apple-news","forks_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/forks","keys_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/teams","hooks_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/hooks","issue_events_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/issues/events{/number}","events_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/events","assignees_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/assignees{/user}","branches_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/branches{/branch}","tags_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/tags","blobs_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/git/refs{/sha}","trees_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/statuses/{sha}","languages_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/languages","stargazers_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/stargazers","contributors_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/contributors","subscribers_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/subscribers","subscription_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/subscription","commits_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/commits{/sha}","git_commits_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/git/commits{/sha}","comments_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/comments{/number}","issue_comment_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/issues/comments{/number}","contents_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/contents/{+path}","compare_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/merges","archive_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/downloads","issues_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/issues{/number}","pulls_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls{/number}","milestones_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/milestones{/number}","notifications_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/labels{/name}","releases_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/releases{/id}","deployments_url":"https://api.github.com/repos/micnews/article-json-to-apple-news/deployments","created_at":"2016-04-06T15:00:42Z","updated_at":"2016-04-09T17:40:24Z","pushed_at":"2016-04-09T16:14:07Z","git_url":"git://github.com/micnews/article-json-to-apple-news.git","ssh_url":"git@github.com:micnews/article-json-to-apple-news.git","clone_url":"https://github.com/micnews/article-json-to-apple-news.git","svn_url":"https://github.com/micnews/article-json-to-apple-news","homepage":null,"size":55,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"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/micnews/article-json-to-apple-news/pulls/3"},"html":{"href":"https://github.com/micnews/article-json-to-apple-news/pull/3"},"issue":{"href":"https://api.github.com/repos/micnews/article-json-to-apple-news/issues/3"},"comments":{"href":"https://api.github.com/repos/micnews/article-json-to-apple-news/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/micnews/article-json-to-apple-news/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/micnews/article-json-to-apple-news/statuses/5e01c09d434984be69c7c34703ad0ad5e3386fc3"}}}}