{"action":"closed","number":2083,"pull_request":{"url":"https://api.github.com/repos/prettier/prettier/pulls/2083","id":124974698,"html_url":"https://github.com/prettier/prettier/pull/2083","diff_url":"https://github.com/prettier/prettier/pull/2083.diff","patch_url":"https://github.com/prettier/prettier/pull/2083.patch","issue_url":"https://api.github.com/repos/prettier/prettier/issues/2083","number":2083,"state":"closed","locked":false,"title":"HTML: Add parse5/htmlparser2 printer","user":{"login":"azz","id":1297597,"avatar_url":"https://avatars0.githubusercontent.com/u/1297597?v=3","gravatar_id":"","url":"https://api.github.com/users/azz","html_url":"https://github.com/azz","followers_url":"https://api.github.com/users/azz/followers","following_url":"https://api.github.com/users/azz/following{/other_user}","gists_url":"https://api.github.com/users/azz/gists{/gist_id}","starred_url":"https://api.github.com/users/azz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azz/subscriptions","organizations_url":"https://api.github.com/users/azz/orgs","repos_url":"https://api.github.com/users/azz/repos","events_url":"https://api.github.com/users/azz/events{/privacy}","received_events_url":"https://api.github.com/users/azz/received_events","type":"User","site_admin":false},"body":"This PR introduces the [parse5](https://github.com/inikulin/parse5) parser, producing a [htmlparser2](https://github.com/fb55/htmlparser2) AST.\r\n\r\nParse5 was chosen due to compliance, and the ability to switch between different AST representations.\r\n\r\nThe htmlparser2 AST was chosen since it is simpler to work with in prettier. parse5's default AST doesn't track `node.kind` in the way we would like.\r\n\r\nSimilar to the method used to implement CSS template string formatting (#1948), the idea is to first introduce a fully compliant HTML5 printer, then use heuristics to switch to:\r\n* Glimmer parser, based on `<script type>` or `<template lang>`.\r\n* TypeScript or Babylon parsers, based on `<script type>` or `<script lang>`.\r\n* PostCSS parser, based on `<style>`.\r\n\r\n#1951, #1882.","created_at":"2017-06-10T02:18:49Z","updated_at":"2017-06-10T02:23:00Z","closed_at":"2017-06-10T02:23:00Z","merged_at":"2017-06-10T02:23:00Z","merge_commit_sha":"d00956d51da38faa5c88d900ec5780cb1789b472","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/prettier/prettier/pulls/2083/commits","review_comments_url":"https://api.github.com/repos/prettier/prettier/pulls/2083/comments","review_comment_url":"https://api.github.com/repos/prettier/prettier/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prettier/prettier/issues/2083/comments","statuses_url":"https://api.github.com/repos/prettier/prettier/statuses/3da26e7ccc8c25ba0f82524bf28b710b6a2bcb3b","head":{"label":"azz:feat/html5","ref":"feat/html5","sha":"3da26e7ccc8c25ba0f82524bf28b710b6a2bcb3b","user":{"login":"azz","id":1297597,"avatar_url":"https://avatars0.githubusercontent.com/u/1297597?v=3","gravatar_id":"","url":"https://api.github.com/users/azz","html_url":"https://github.com/azz","followers_url":"https://api.github.com/users/azz/followers","following_url":"https://api.github.com/users/azz/following{/other_user}","gists_url":"https://api.github.com/users/azz/gists{/gist_id}","starred_url":"https://api.github.com/users/azz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azz/subscriptions","organizations_url":"https://api.github.com/users/azz/orgs","repos_url":"https://api.github.com/users/azz/repos","events_url":"https://api.github.com/users/azz/events{/privacy}","received_events_url":"https://api.github.com/users/azz/received_events","type":"User","site_admin":false},"repo":{"id":89310962,"name":"prettier","full_name":"azz/prettier","owner":{"login":"azz","id":1297597,"avatar_url":"https://avatars0.githubusercontent.com/u/1297597?v=3","gravatar_id":"","url":"https://api.github.com/users/azz","html_url":"https://github.com/azz","followers_url":"https://api.github.com/users/azz/followers","following_url":"https://api.github.com/users/azz/following{/other_user}","gists_url":"https://api.github.com/users/azz/gists{/gist_id}","starred_url":"https://api.github.com/users/azz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azz/subscriptions","organizations_url":"https://api.github.com/users/azz/orgs","repos_url":"https://api.github.com/users/azz/repos","events_url":"https://api.github.com/users/azz/events{/privacy}","received_events_url":"https://api.github.com/users/azz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/azz/prettier","description":"Prettier is an opinionated JavaScript formatter.","fork":true,"url":"https://api.github.com/repos/azz/prettier","forks_url":"https://api.github.com/repos/azz/prettier/forks","keys_url":"https://api.github.com/repos/azz/prettier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azz/prettier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azz/prettier/teams","hooks_url":"https://api.github.com/repos/azz/prettier/hooks","issue_events_url":"https://api.github.com/repos/azz/prettier/issues/events{/number}","events_url":"https://api.github.com/repos/azz/prettier/events","assignees_url":"https://api.github.com/repos/azz/prettier/assignees{/user}","branches_url":"https://api.github.com/repos/azz/prettier/branches{/branch}","tags_url":"https://api.github.com/repos/azz/prettier/tags","blobs_url":"https://api.github.com/repos/azz/prettier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azz/prettier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azz/prettier/git/refs{/sha}","trees_url":"https://api.github.com/repos/azz/prettier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azz/prettier/statuses/{sha}","languages_url":"https://api.github.com/repos/azz/prettier/languages","stargazers_url":"https://api.github.com/repos/azz/prettier/stargazers","contributors_url":"https://api.github.com/repos/azz/prettier/contributors","subscribers_url":"https://api.github.com/repos/azz/prettier/subscribers","subscription_url":"https://api.github.com/repos/azz/prettier/subscription","commits_url":"https://api.github.com/repos/azz/prettier/commits{/sha}","git_commits_url":"https://api.github.com/repos/azz/prettier/git/commits{/sha}","comments_url":"https://api.github.com/repos/azz/prettier/comments{/number}","issue_comment_url":"https://api.github.com/repos/azz/prettier/issues/comments{/number}","contents_url":"https://api.github.com/repos/azz/prettier/contents/{+path}","compare_url":"https://api.github.com/repos/azz/prettier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azz/prettier/merges","archive_url":"https://api.github.com/repos/azz/prettier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azz/prettier/downloads","issues_url":"https://api.github.com/repos/azz/prettier/issues{/number}","pulls_url":"https://api.github.com/repos/azz/prettier/pulls{/number}","milestones_url":"https://api.github.com/repos/azz/prettier/milestones{/number}","notifications_url":"https://api.github.com/repos/azz/prettier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azz/prettier/labels{/name}","releases_url":"https://api.github.com/repos/azz/prettier/releases{/id}","deployments_url":"https://api.github.com/repos/azz/prettier/deployments","created_at":"2017-04-25T02:59:18Z","updated_at":"2017-04-25T02:59:21Z","pushed_at":"2017-06-10T02:06:46Z","git_url":"git://github.com/azz/prettier.git","ssh_url":"git@github.com:azz/prettier.git","clone_url":"https://github.com/azz/prettier.git","svn_url":"https://github.com/azz/prettier","homepage":"https://prettier.github.io/prettier/","size":12355,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"prettier:master","ref":"master","sha":"f399e90bc2ac473bcea7d3065cf5ed3d8cab7aad","user":{"login":"prettier","id":25822731,"avatar_url":"https://avatars1.githubusercontent.com/u/25822731?v=3","gravatar_id":"","url":"https://api.github.com/users/prettier","html_url":"https://github.com/prettier","followers_url":"https://api.github.com/users/prettier/followers","following_url":"https://api.github.com/users/prettier/following{/other_user}","gists_url":"https://api.github.com/users/prettier/gists{/gist_id}","starred_url":"https://api.github.com/users/prettier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prettier/subscriptions","organizations_url":"https://api.github.com/users/prettier/orgs","repos_url":"https://api.github.com/users/prettier/repos","events_url":"https://api.github.com/users/prettier/events{/privacy}","received_events_url":"https://api.github.com/users/prettier/received_events","type":"Organization","site_admin":false},"repo":{"id":75104123,"name":"prettier","full_name":"prettier/prettier","owner":{"login":"prettier","id":25822731,"avatar_url":"https://avatars1.githubusercontent.com/u/25822731?v=3","gravatar_id":"","url":"https://api.github.com/users/prettier","html_url":"https://github.com/prettier","followers_url":"https://api.github.com/users/prettier/followers","following_url":"https://api.github.com/users/prettier/following{/other_user}","gists_url":"https://api.github.com/users/prettier/gists{/gist_id}","starred_url":"https://api.github.com/users/prettier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prettier/subscriptions","organizations_url":"https://api.github.com/users/prettier/orgs","repos_url":"https://api.github.com/users/prettier/repos","events_url":"https://api.github.com/users/prettier/events{/privacy}","received_events_url":"https://api.github.com/users/prettier/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prettier/prettier","description":"Prettier is an opinionated code formatter.","fork":false,"url":"https://api.github.com/repos/prettier/prettier","forks_url":"https://api.github.com/repos/prettier/prettier/forks","keys_url":"https://api.github.com/repos/prettier/prettier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prettier/prettier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prettier/prettier/teams","hooks_url":"https://api.github.com/repos/prettier/prettier/hooks","issue_events_url":"https://api.github.com/repos/prettier/prettier/issues/events{/number}","events_url":"https://api.github.com/repos/prettier/prettier/events","assignees_url":"https://api.github.com/repos/prettier/prettier/assignees{/user}","branches_url":"https://api.github.com/repos/prettier/prettier/branches{/branch}","tags_url":"https://api.github.com/repos/prettier/prettier/tags","blobs_url":"https://api.github.com/repos/prettier/prettier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prettier/prettier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prettier/prettier/git/refs{/sha}","trees_url":"https://api.github.com/repos/prettier/prettier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prettier/prettier/statuses/{sha}","languages_url":"https://api.github.com/repos/prettier/prettier/languages","stargazers_url":"https://api.github.com/repos/prettier/prettier/stargazers","contributors_url":"https://api.github.com/repos/prettier/prettier/contributors","subscribers_url":"https://api.github.com/repos/prettier/prettier/subscribers","subscription_url":"https://api.github.com/repos/prettier/prettier/subscription","commits_url":"https://api.github.com/repos/prettier/prettier/commits{/sha}","git_commits_url":"https://api.github.com/repos/prettier/prettier/git/commits{/sha}","comments_url":"https://api.github.com/repos/prettier/prettier/comments{/number}","issue_comment_url":"https://api.github.com/repos/prettier/prettier/issues/comments{/number}","contents_url":"https://api.github.com/repos/prettier/prettier/contents/{+path}","compare_url":"https://api.github.com/repos/prettier/prettier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prettier/prettier/merges","archive_url":"https://api.github.com/repos/prettier/prettier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prettier/prettier/downloads","issues_url":"https://api.github.com/repos/prettier/prettier/issues{/number}","pulls_url":"https://api.github.com/repos/prettier/prettier/pulls{/number}","milestones_url":"https://api.github.com/repos/prettier/prettier/milestones{/number}","notifications_url":"https://api.github.com/repos/prettier/prettier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prettier/prettier/labels{/name}","releases_url":"https://api.github.com/repos/prettier/prettier/releases{/id}","deployments_url":"https://api.github.com/repos/prettier/prettier/deployments","created_at":"2016-11-29T17:13:37Z","updated_at":"2017-06-10T01:24:39Z","pushed_at":"2017-06-10T02:23:00Z","git_url":"git://github.com/prettier/prettier.git","ssh_url":"git@github.com:prettier/prettier.git","clone_url":"https://github.com/prettier/prettier.git","svn_url":"https://github.com/prettier/prettier","homepage":"https://prettier.github.io/prettier/","size":12822,"stargazers_count":10864,"watchers_count":10864,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":380,"mirror_url":null,"open_issues_count":117,"forks":380,"open_issues":117,"watchers":10864,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prettier/prettier/pulls/2083"},"html":{"href":"https://github.com/prettier/prettier/pull/2083"},"issue":{"href":"https://api.github.com/repos/prettier/prettier/issues/2083"},"comments":{"href":"https://api.github.com/repos/prettier/prettier/issues/2083/comments"},"review_comments":{"href":"https://api.github.com/repos/prettier/prettier/pulls/2083/comments"},"review_comment":{"href":"https://api.github.com/repos/prettier/prettier/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prettier/prettier/pulls/2083/commits"},"statuses":{"href":"https://api.github.com/repos/prettier/prettier/statuses/3da26e7ccc8c25ba0f82524bf28b710b6a2bcb3b"}},"merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"vjeux","id":197597,"avatar_url":"https://avatars3.githubusercontent.com/u/197597?v=3","gravatar_id":"","url":"https://api.github.com/users/vjeux","html_url":"https://github.com/vjeux","followers_url":"https://api.github.com/users/vjeux/followers","following_url":"https://api.github.com/users/vjeux/following{/other_user}","gists_url":"https://api.github.com/users/vjeux/gists{/gist_id}","starred_url":"https://api.github.com/users/vjeux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vjeux/subscriptions","organizations_url":"https://api.github.com/users/vjeux/orgs","repos_url":"https://api.github.com/users/vjeux/repos","events_url":"https://api.github.com/users/vjeux/events{/privacy}","received_events_url":"https://api.github.com/users/vjeux/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":203,"deletions":15,"changed_files":12}}
{"actor":{"display_login":"vjeux"}}