{"action":"created","comment":{"url":"https://api.github.com/repos/hashicorp/hcl/pulls/comments/46307682","id":46307682,"diff_hunk":"@@ -224,7 +224,11 @@ func (s *Scanner) scanComment(ch rune) {\n \t// single line comments\n \tif ch == '#' || (ch == '/' && s.peek() != '*') {\n \t\tch = s.next()\n-\t\tfor ch != '\\n' && ch >= 0 && ch != eof {\n+\t\tfor ch != '\\n' && ch != '\\r' && ch >= 0 && ch != eof {\n+\t\t\tif ch == '\\r' && s.peek() == '\\n' {","path":"hcl/scanner/scanner.go","position":6,"original_position":6,"commit_id":"3dcff2e2445efbea369055a6085d92c663c5979b","original_commit_id":"3dcff2e2445efbea369055a6085d92c663c5979b","user":{"login":"phinze","id":37534,"avatar_url":"https://avatars.githubusercontent.com/u/37534?v=3","gravatar_id":"","url":"https://api.github.com/users/phinze","html_url":"https://github.com/phinze","followers_url":"https://api.github.com/users/phinze/followers","following_url":"https://api.github.com/users/phinze/following{/other_user}","gists_url":"https://api.github.com/users/phinze/gists{/gist_id}","starred_url":"https://api.github.com/users/phinze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phinze/subscriptions","organizations_url":"https://api.github.com/users/phinze/orgs","repos_url":"https://api.github.com/users/phinze/repos","events_url":"https://api.github.com/users/phinze/events{/privacy}","received_events_url":"https://api.github.com/users/phinze/received_events","type":"User","site_admin":false},"body":"Oh sorry - by \"the guard\" I mean the one on L227.","created_at":"2015-12-01T17:17:14Z","updated_at":"2015-12-01T17:17:14Z","html_url":"https://github.com/hashicorp/hcl/pull/71#discussion_r46307682","pull_request_url":"https://api.github.com/repos/hashicorp/hcl/pulls/71","_links":{"self":{"href":"https://api.github.com/repos/hashicorp/hcl/pulls/comments/46307682"},"html":{"href":"https://github.com/hashicorp/hcl/pull/71#discussion_r46307682"},"pull_request":{"href":"https://api.github.com/repos/hashicorp/hcl/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/hashicorp/hcl/pulls/71","id":52286757,"html_url":"https://github.com/hashicorp/hcl/pull/71","diff_url":"https://github.com/hashicorp/hcl/pull/71.diff","patch_url":"https://github.com/hashicorp/hcl/pull/71.patch","issue_url":"https://api.github.com/repos/hashicorp/hcl/issues/71","number":71,"state":"open","locked":false,"title":"Fix scanner for Windows line endings and add tests","user":{"login":"jen20","id":548524,"avatar_url":"https://avatars.githubusercontent.com/u/548524?v=3","gravatar_id":"","url":"https://api.github.com/users/jen20","html_url":"https://github.com/jen20","followers_url":"https://api.github.com/users/jen20/followers","following_url":"https://api.github.com/users/jen20/following{/other_user}","gists_url":"https://api.github.com/users/jen20/gists{/gist_id}","starred_url":"https://api.github.com/users/jen20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jen20/subscriptions","organizations_url":"https://api.github.com/users/jen20/orgs","repos_url":"https://api.github.com/users/jen20/repos","events_url":"https://api.github.com/users/jen20/events{/privacy}","received_events_url":"https://api.github.com/users/jen20/received_events","type":"User","site_admin":false},"body":"I think this should be enough to fix hashicorp/terraform#4069, though this is not yet verified and changes to the parser may also be necessary.","created_at":"2015-12-01T17:12:53Z","updated_at":"2015-12-01T17:17:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2db0392d70aaeea00ac3c701679264f5706476df","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hashicorp/hcl/pulls/71/commits","review_comments_url":"https://api.github.com/repos/hashicorp/hcl/pulls/71/comments","review_comment_url":"https://api.github.com/repos/hashicorp/hcl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hashicorp/hcl/issues/71/comments","statuses_url":"https://api.github.com/repos/hashicorp/hcl/statuses/3dcff2e2445efbea369055a6085d92c663c5979b","head":{"label":"hashicorp:b-dos-line-endings","ref":"b-dos-line-endings","sha":"3dcff2e2445efbea369055a6085d92c663c5979b","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":22485114,"name":"hcl","full_name":"hashicorp/hcl","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/hcl","description":"HCL is a configuration language.","fork":false,"url":"https://api.github.com/repos/hashicorp/hcl","forks_url":"https://api.github.com/repos/hashicorp/hcl/forks","keys_url":"https://api.github.com/repos/hashicorp/hcl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/hcl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/hcl/teams","hooks_url":"https://api.github.com/repos/hashicorp/hcl/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/hcl/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/hcl/events","assignees_url":"https://api.github.com/repos/hashicorp/hcl/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/hcl/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/hcl/tags","blobs_url":"https://api.github.com/repos/hashicorp/hcl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/hcl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/hcl/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/hcl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/hcl/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/hcl/languages","stargazers_url":"https://api.github.com/repos/hashicorp/hcl/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/hcl/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/hcl/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/hcl/subscription","commits_url":"https://api.github.com/repos/hashicorp/hcl/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/hcl/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/hcl/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/hcl/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/hcl/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/hcl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/hcl/merges","archive_url":"https://api.github.com/repos/hashicorp/hcl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/hcl/downloads","issues_url":"https://api.github.com/repos/hashicorp/hcl/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/hcl/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/hcl/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/hcl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/hcl/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/hcl/releases{/id}","created_at":"2014-07-31T21:09:00Z","updated_at":"2015-12-01T12:54:48Z","pushed_at":"2015-12-01T17:13:30Z","git_url":"git://github.com/hashicorp/hcl.git","ssh_url":"git@github.com:hashicorp/hcl.git","clone_url":"https://github.com/hashicorp/hcl.git","svn_url":"https://github.com/hashicorp/hcl","homepage":null,"size":369,"stargazers_count":487,"watchers_count":487,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":21,"forks":34,"open_issues":21,"watchers":487,"default_branch":"master"}},"base":{"label":"hashicorp:master","ref":"master","sha":"8a65681ce2989c2774564046e2f5fb43482c9f2b","user":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"repo":{"id":22485114,"name":"hcl","full_name":"hashicorp/hcl","owner":{"login":"hashicorp","id":761456,"avatar_url":"https://avatars.githubusercontent.com/u/761456?v=3","gravatar_id":"","url":"https://api.github.com/users/hashicorp","html_url":"https://github.com/hashicorp","followers_url":"https://api.github.com/users/hashicorp/followers","following_url":"https://api.github.com/users/hashicorp/following{/other_user}","gists_url":"https://api.github.com/users/hashicorp/gists{/gist_id}","starred_url":"https://api.github.com/users/hashicorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashicorp/subscriptions","organizations_url":"https://api.github.com/users/hashicorp/orgs","repos_url":"https://api.github.com/users/hashicorp/repos","events_url":"https://api.github.com/users/hashicorp/events{/privacy}","received_events_url":"https://api.github.com/users/hashicorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashicorp/hcl","description":"HCL is a configuration language.","fork":false,"url":"https://api.github.com/repos/hashicorp/hcl","forks_url":"https://api.github.com/repos/hashicorp/hcl/forks","keys_url":"https://api.github.com/repos/hashicorp/hcl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashicorp/hcl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashicorp/hcl/teams","hooks_url":"https://api.github.com/repos/hashicorp/hcl/hooks","issue_events_url":"https://api.github.com/repos/hashicorp/hcl/issues/events{/number}","events_url":"https://api.github.com/repos/hashicorp/hcl/events","assignees_url":"https://api.github.com/repos/hashicorp/hcl/assignees{/user}","branches_url":"https://api.github.com/repos/hashicorp/hcl/branches{/branch}","tags_url":"https://api.github.com/repos/hashicorp/hcl/tags","blobs_url":"https://api.github.com/repos/hashicorp/hcl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashicorp/hcl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashicorp/hcl/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashicorp/hcl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashicorp/hcl/statuses/{sha}","languages_url":"https://api.github.com/repos/hashicorp/hcl/languages","stargazers_url":"https://api.github.com/repos/hashicorp/hcl/stargazers","contributors_url":"https://api.github.com/repos/hashicorp/hcl/contributors","subscribers_url":"https://api.github.com/repos/hashicorp/hcl/subscribers","subscription_url":"https://api.github.com/repos/hashicorp/hcl/subscription","commits_url":"https://api.github.com/repos/hashicorp/hcl/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashicorp/hcl/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashicorp/hcl/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashicorp/hcl/issues/comments{/number}","contents_url":"https://api.github.com/repos/hashicorp/hcl/contents/{+path}","compare_url":"https://api.github.com/repos/hashicorp/hcl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashicorp/hcl/merges","archive_url":"https://api.github.com/repos/hashicorp/hcl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashicorp/hcl/downloads","issues_url":"https://api.github.com/repos/hashicorp/hcl/issues{/number}","pulls_url":"https://api.github.com/repos/hashicorp/hcl/pulls{/number}","milestones_url":"https://api.github.com/repos/hashicorp/hcl/milestones{/number}","notifications_url":"https://api.github.com/repos/hashicorp/hcl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashicorp/hcl/labels{/name}","releases_url":"https://api.github.com/repos/hashicorp/hcl/releases{/id}","created_at":"2014-07-31T21:09:00Z","updated_at":"2015-12-01T12:54:48Z","pushed_at":"2015-12-01T17:13:30Z","git_url":"git://github.com/hashicorp/hcl.git","ssh_url":"git@github.com:hashicorp/hcl.git","clone_url":"https://github.com/hashicorp/hcl.git","svn_url":"https://github.com/hashicorp/hcl","homepage":null,"size":369,"stargazers_count":487,"watchers_count":487,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":21,"forks":34,"open_issues":21,"watchers":487,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hashicorp/hcl/pulls/71"},"html":{"href":"https://github.com/hashicorp/hcl/pull/71"},"issue":{"href":"https://api.github.com/repos/hashicorp/hcl/issues/71"},"comments":{"href":"https://api.github.com/repos/hashicorp/hcl/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/hashicorp/hcl/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/hashicorp/hcl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hashicorp/hcl/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/hashicorp/hcl/statuses/3dcff2e2445efbea369055a6085d92c663c5979b"}}}}