{"action":"created","comment":{"url":"https://api.github.com/repos/w3c/webidl2.js/pulls/comments/192927384","pull_request_review_id":125797723,"id":192927384,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjkyNzM4NA==","diff_hunk":"@@ -13,16 +13,19 @@\n       return it.value;\n     };\n     function type(it) {\n-      if (typeof it === \"string\") return opt.type(it); // XXX should maintain some context\n       let ret = extended_attributes(it.extAttrs);\n-      if (it.union) ret += `(${it.idlType.map(type).join(\" or \")})`;\n+      if (it.prefix) ret += it.prefix.trivia + it.prefix.value;\n+      if (it.union) ret += `${it.trivia.open}(${it.idlType.map(type).join(\"\")}${it.trivia.close})`;\n       else {\n-        if (it.generic) ret += `${it.generic}<`;\n-        if (Array.isArray(it.idlType)) ret += it.idlType.map(type).join(\", \");\n-        else ret += type(it.idlType);\n-        if (it.generic) ret += \">\";\n+        ret += it.trivia.base;\n+        if (it.generic) ret += `${it.generic.value}${it.generic.trivia.open}<`;\n+        if (Array.isArray(it.idlType)) ret += it.idlType.map(type).join(\"\");\n+        else ret += typeof it.idlType === \"string\" ? it.baseName : type(it.idlType);","path":"lib/writer.js","position":17,"original_position":17,"commit_id":"0656f19421ff11e5a32dc8c6bb2b9649c8e170b7","original_commit_id":"0656f19421ff11e5a32dc8c6bb2b9649c8e170b7","user":{"login":"marcoscaceres","id":870154,"node_id":"MDQ6VXNlcjg3MDE1NA==","avatar_url":"https://avatars1.githubusercontent.com/u/870154?v=4","gravatar_id":"","url":"https://api.github.com/users/marcoscaceres","html_url":"https://github.com/marcoscaceres","followers_url":"https://api.github.com/users/marcoscaceres/followers","following_url":"https://api.github.com/users/marcoscaceres/following{/other_user}","gists_url":"https://api.github.com/users/marcoscaceres/gists{/gist_id}","starred_url":"https://api.github.com/users/marcoscaceres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcoscaceres/subscriptions","organizations_url":"https://api.github.com/users/marcoscaceres/orgs","repos_url":"https://api.github.com/users/marcoscaceres/repos","events_url":"https://api.github.com/users/marcoscaceres/events{/privacy}","received_events_url":"https://api.github.com/users/marcoscaceres/received_events","type":"User","site_admin":false},"body":"Alternative, if it's not an array, cast it into an array? ","created_at":"2018-06-05T01:59:57Z","updated_at":"2018-06-05T01:59:57Z","html_url":"https://github.com/w3c/webidl2.js/pull/185#discussion_r192927384","pull_request_url":"https://api.github.com/repos/w3c/webidl2.js/pulls/185","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/w3c/webidl2.js/pulls/comments/192927384"},"html":{"href":"https://github.com/w3c/webidl2.js/pull/185#discussion_r192927384"},"pull_request":{"href":"https://api.github.com/repos/w3c/webidl2.js/pulls/185"}},"in_reply_to_id":192927309},"pull_request":{"url":"https://api.github.com/repos/w3c/webidl2.js/pulls/185","id":192238858,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMjM4ODU4","html_url":"https://github.com/w3c/webidl2.js/pull/185","diff_url":"https://github.com/w3c/webidl2.js/pull/185.diff","patch_url":"https://github.com/w3c/webidl2.js/pull/185.patch","issue_url":"https://api.github.com/repos/w3c/webidl2.js/issues/185","number":185,"state":"open","locked":false,"title":"BREAKING CHANGE: support full whitespace conservation","user":{"login":"saschanaz","id":3396686,"node_id":"MDQ6VXNlcjMzOTY2ODY=","avatar_url":"https://avatars2.githubusercontent.com/u/3396686?v=4","gravatar_id":"","url":"https://api.github.com/users/saschanaz","html_url":"https://github.com/saschanaz","followers_url":"https://api.github.com/users/saschanaz/followers","following_url":"https://api.github.com/users/saschanaz/following{/other_user}","gists_url":"https://api.github.com/users/saschanaz/gists{/gist_id}","starred_url":"https://api.github.com/users/saschanaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saschanaz/subscriptions","organizations_url":"https://api.github.com/users/saschanaz/orgs","repos_url":"https://api.github.com/users/saschanaz/repos","events_url":"https://api.github.com/users/saschanaz/events{/privacy}","received_events_url":"https://api.github.com/users/saschanaz/received_events","type":"User","site_admin":false},"body":"Yeah... so this fixes #125, but probably this is too big to review.\r\n\r\nBreaking changes here:\r\n\r\n1. Modifiers are now objects rather than Booleans, with `trivia` field.\r\n2. `extAttrs` field now gives a nullable object with `items` and `trivia` field rather than an array.\r\n3. Some fields on operation objects are now moved into `body`, because `stringify;` is a bodyless operation.\r\n4. `name` field on operations now gives a nullable object with `trivia` field, as operations can be anonymous.\r\n\r\nThis should finally enable ReSpec to upgrade to the latest webidl2.js.","created_at":"2018-06-03T09:37:39Z","updated_at":"2018-06-05T01:59:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ccd7e566ae25769a299daf357c785a0eefab8bac","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/w3c/webidl2.js/pulls/185/commits","review_comments_url":"https://api.github.com/repos/w3c/webidl2.js/pulls/185/comments","review_comment_url":"https://api.github.com/repos/w3c/webidl2.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/w3c/webidl2.js/issues/185/comments","statuses_url":"https://api.github.com/repos/w3c/webidl2.js/statuses/0656f19421ff11e5a32dc8c6bb2b9649c8e170b7","head":{"label":"w3c:reconstruction","ref":"reconstruction","sha":"0656f19421ff11e5a32dc8c6bb2b9649c8e170b7","user":{"login":"w3c","id":379216,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTIxNg==","avatar_url":"https://avatars2.githubusercontent.com/u/379216?v=4","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"repo":{"id":6415402,"node_id":"MDEwOlJlcG9zaXRvcnk2NDE1NDAy","name":"webidl2.js","full_name":"w3c/webidl2.js","owner":{"login":"w3c","id":379216,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTIxNg==","avatar_url":"https://avatars2.githubusercontent.com/u/379216?v=4","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/w3c/webidl2.js","description":"WebIDL parser","fork":false,"url":"https://api.github.com/repos/w3c/webidl2.js","forks_url":"https://api.github.com/repos/w3c/webidl2.js/forks","keys_url":"https://api.github.com/repos/w3c/webidl2.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/w3c/webidl2.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/w3c/webidl2.js/teams","hooks_url":"https://api.github.com/repos/w3c/webidl2.js/hooks","issue_events_url":"https://api.github.com/repos/w3c/webidl2.js/issues/events{/number}","events_url":"https://api.github.com/repos/w3c/webidl2.js/events","assignees_url":"https://api.github.com/repos/w3c/webidl2.js/assignees{/user}","branches_url":"https://api.github.com/repos/w3c/webidl2.js/branches{/branch}","tags_url":"https://api.github.com/repos/w3c/webidl2.js/tags","blobs_url":"https://api.github.com/repos/w3c/webidl2.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/w3c/webidl2.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/w3c/webidl2.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/w3c/webidl2.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/w3c/webidl2.js/statuses/{sha}","languages_url":"https://api.github.com/repos/w3c/webidl2.js/languages","stargazers_url":"https://api.github.com/repos/w3c/webidl2.js/stargazers","contributors_url":"https://api.github.com/repos/w3c/webidl2.js/contributors","subscribers_url":"https://api.github.com/repos/w3c/webidl2.js/subscribers","subscription_url":"https://api.github.com/repos/w3c/webidl2.js/subscription","commits_url":"https://api.github.com/repos/w3c/webidl2.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/w3c/webidl2.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/w3c/webidl2.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/w3c/webidl2.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/w3c/webidl2.js/contents/{+path}","compare_url":"https://api.github.com/repos/w3c/webidl2.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/w3c/webidl2.js/merges","archive_url":"https://api.github.com/repos/w3c/webidl2.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/w3c/webidl2.js/downloads","issues_url":"https://api.github.com/repos/w3c/webidl2.js/issues{/number}","pulls_url":"https://api.github.com/repos/w3c/webidl2.js/pulls{/number}","milestones_url":"https://api.github.com/repos/w3c/webidl2.js/milestones{/number}","notifications_url":"https://api.github.com/repos/w3c/webidl2.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/w3c/webidl2.js/labels{/name}","releases_url":"https://api.github.com/repos/w3c/webidl2.js/releases{/id}","deployments_url":"https://api.github.com/repos/w3c/webidl2.js/deployments","created_at":"2012-10-27T09:11:39Z","updated_at":"2018-06-04T23:50:12Z","pushed_at":"2018-06-05T01:51:57Z","git_url":"git://github.com/w3c/webidl2.js.git","ssh_url":"git@github.com:w3c/webidl2.js.git","clone_url":"https://github.com/w3c/webidl2.js.git","svn_url":"https://github.com/w3c/webidl2.js","homepage":null,"size":790,"stargazers_count":102,"watchers_count":102,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":43,"open_issues":13,"watchers":102,"default_branch":"develop"}},"base":{"label":"w3c:develop","ref":"develop","sha":"1ea9f9c91a488958e95a051328e6eaf6a825baf7","user":{"login":"w3c","id":379216,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTIxNg==","avatar_url":"https://avatars2.githubusercontent.com/u/379216?v=4","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"repo":{"id":6415402,"node_id":"MDEwOlJlcG9zaXRvcnk2NDE1NDAy","name":"webidl2.js","full_name":"w3c/webidl2.js","owner":{"login":"w3c","id":379216,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3OTIxNg==","avatar_url":"https://avatars2.githubusercontent.com/u/379216?v=4","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/w3c/webidl2.js","description":"WebIDL parser","fork":false,"url":"https://api.github.com/repos/w3c/webidl2.js","forks_url":"https://api.github.com/repos/w3c/webidl2.js/forks","keys_url":"https://api.github.com/repos/w3c/webidl2.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/w3c/webidl2.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/w3c/webidl2.js/teams","hooks_url":"https://api.github.com/repos/w3c/webidl2.js/hooks","issue_events_url":"https://api.github.com/repos/w3c/webidl2.js/issues/events{/number}","events_url":"https://api.github.com/repos/w3c/webidl2.js/events","assignees_url":"https://api.github.com/repos/w3c/webidl2.js/assignees{/user}","branches_url":"https://api.github.com/repos/w3c/webidl2.js/branches{/branch}","tags_url":"https://api.github.com/repos/w3c/webidl2.js/tags","blobs_url":"https://api.github.com/repos/w3c/webidl2.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/w3c/webidl2.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/w3c/webidl2.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/w3c/webidl2.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/w3c/webidl2.js/statuses/{sha}","languages_url":"https://api.github.com/repos/w3c/webidl2.js/languages","stargazers_url":"https://api.github.com/repos/w3c/webidl2.js/stargazers","contributors_url":"https://api.github.com/repos/w3c/webidl2.js/contributors","subscribers_url":"https://api.github.com/repos/w3c/webidl2.js/subscribers","subscription_url":"https://api.github.com/repos/w3c/webidl2.js/subscription","commits_url":"https://api.github.com/repos/w3c/webidl2.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/w3c/webidl2.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/w3c/webidl2.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/w3c/webidl2.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/w3c/webidl2.js/contents/{+path}","compare_url":"https://api.github.com/repos/w3c/webidl2.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/w3c/webidl2.js/merges","archive_url":"https://api.github.com/repos/w3c/webidl2.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/w3c/webidl2.js/downloads","issues_url":"https://api.github.com/repos/w3c/webidl2.js/issues{/number}","pulls_url":"https://api.github.com/repos/w3c/webidl2.js/pulls{/number}","milestones_url":"https://api.github.com/repos/w3c/webidl2.js/milestones{/number}","notifications_url":"https://api.github.com/repos/w3c/webidl2.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/w3c/webidl2.js/labels{/name}","releases_url":"https://api.github.com/repos/w3c/webidl2.js/releases{/id}","deployments_url":"https://api.github.com/repos/w3c/webidl2.js/deployments","created_at":"2012-10-27T09:11:39Z","updated_at":"2018-06-04T23:50:12Z","pushed_at":"2018-06-05T01:51:57Z","git_url":"git://github.com/w3c/webidl2.js.git","ssh_url":"git@github.com:w3c/webidl2.js.git","clone_url":"https://github.com/w3c/webidl2.js.git","svn_url":"https://github.com/w3c/webidl2.js","homepage":null,"size":790,"stargazers_count":102,"watchers_count":102,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":43,"open_issues":13,"watchers":102,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/w3c/webidl2.js/pulls/185"},"html":{"href":"https://github.com/w3c/webidl2.js/pull/185"},"issue":{"href":"https://api.github.com/repos/w3c/webidl2.js/issues/185"},"comments":{"href":"https://api.github.com/repos/w3c/webidl2.js/issues/185/comments"},"review_comments":{"href":"https://api.github.com/repos/w3c/webidl2.js/pulls/185/comments"},"review_comment":{"href":"https://api.github.com/repos/w3c/webidl2.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/w3c/webidl2.js/pulls/185/commits"},"statuses":{"href":"https://api.github.com/repos/w3c/webidl2.js/statuses/0656f19421ff11e5a32dc8c6bb2b9649c8e170b7"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"marcoscaceres"}}