{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony/pulls/comments/39414724","id":39414724,"diff_hunk":"@@ -209,7 +209,7 @@ public static function parseScalar($scalar, $delimiters = null, $stringDelimiter\n                 $i += strlen($output);\n \n                 // remove comments\n-                if (false !== $strpos = strpos($output, ' #')) {\n+                if ((false !== $strpos = strpos($output, '#')) && (' ' === $output[$strpos - 1] || \"\\t\" === $output[$strpos - 1])) {","path":"src/Symfony/Component/Yaml/Inline.php","position":5,"original_position":5,"commit_id":"e27f69db26875329207d82b833bc429dd77fc482","original_commit_id":"e27f69db26875329207d82b833bc429dd77fc482","user":{"login":"stof","id":439401,"avatar_url":"https://avatars.githubusercontent.com/u/439401?v=3","gravatar_id":"","url":"https://api.github.com/users/stof","html_url":"https://github.com/stof","followers_url":"https://api.github.com/users/stof/followers","following_url":"https://api.github.com/users/stof/following{/other_user}","gists_url":"https://api.github.com/users/stof/gists{/gist_id}","starred_url":"https://api.github.com/users/stof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stof/subscriptions","organizations_url":"https://api.github.com/users/stof/orgs","repos_url":"https://api.github.com/users/stof/repos","events_url":"https://api.github.com/users/stof/events{/privacy}","received_events_url":"https://api.github.com/users/stof/received_events","type":"User","site_admin":false},"body":"wouldn't this break in case ``#`` is the first char is ``$output`` ?","created_at":"2015-09-14T16:27:58Z","updated_at":"2015-09-14T16:27:58Z","html_url":"https://github.com/symfony/symfony/pull/15793#discussion_r39414724","pull_request_url":"https://api.github.com/repos/symfony/symfony/pulls/15793","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments/39414724"},"html":{"href":"https://github.com/symfony/symfony/pull/15793#discussion_r39414724"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony/pulls/15793"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/15793","id":44948750,"html_url":"https://github.com/symfony/symfony/pull/15793","diff_url":"https://github.com/symfony/symfony/pull/15793.diff","patch_url":"https://github.com/symfony/symfony/pull/15793.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/15793","number":15793,"state":"open","locked":false,"title":"[Yaml] Allow tabs before comments at the end of a line","user":{"login":"superdav42","id":1534605,"avatar_url":"https://avatars.githubusercontent.com/u/1534605?v=3","gravatar_id":"","url":"https://api.github.com/users/superdav42","html_url":"https://github.com/superdav42","followers_url":"https://api.github.com/users/superdav42/followers","following_url":"https://api.github.com/users/superdav42/following{/other_user}","gists_url":"https://api.github.com/users/superdav42/gists{/gist_id}","starred_url":"https://api.github.com/users/superdav42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdav42/subscriptions","organizations_url":"https://api.github.com/users/superdav42/orgs","repos_url":"https://api.github.com/users/superdav42/repos","events_url":"https://api.github.com/users/superdav42/events{/privacy}","received_events_url":"https://api.github.com/users/superdav42/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | yes\r\n| New feature?  | no\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | \r\n| License       | MIT\r\n\r\nIf a yml file has a tab character before a line ending comment the comment will be included in the parsed value. Yaml spec allows tab or space as whitespace characters so we need to check for tab as well. See included test.\r\nRecently caused an odd and hard to find bug in our project. \r\n\r\nSee spec:\r\nhttp://www.yaml.org/spec/1.2/spec.html#s-b-comment\r\nhttp://www.yaml.org/spec/1.2/spec.html#s-separate-in-line \r\nhttp://www.yaml.org/spec/1.2/spec.html#s-white\r\n\r\nThis is a new PR replacing https://github.com/symfony/symfony/pull/15747 \r\n\r\n@fabpot ","created_at":"2015-09-14T16:06:37Z","updated_at":"2015-09-14T16:27:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bdaac1c6495bdbcc40d65d54d7fbc3a97cf6973c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/15793/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/15793/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/15793/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/e27f69db26875329207d82b833bc429dd77fc482","head":{"label":"superdav42:YamlCommentsAfterTab","ref":"YamlCommentsAfterTab","sha":"e27f69db26875329207d82b833bc429dd77fc482","user":{"login":"superdav42","id":1534605,"avatar_url":"https://avatars.githubusercontent.com/u/1534605?v=3","gravatar_id":"","url":"https://api.github.com/users/superdav42","html_url":"https://github.com/superdav42","followers_url":"https://api.github.com/users/superdav42/followers","following_url":"https://api.github.com/users/superdav42/following{/other_user}","gists_url":"https://api.github.com/users/superdav42/gists{/gist_id}","starred_url":"https://api.github.com/users/superdav42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdav42/subscriptions","organizations_url":"https://api.github.com/users/superdav42/orgs","repos_url":"https://api.github.com/users/superdav42/repos","events_url":"https://api.github.com/users/superdav42/events{/privacy}","received_events_url":"https://api.github.com/users/superdav42/received_events","type":"User","site_admin":false},"repo":{"id":14433352,"name":"symfony","full_name":"superdav42/symfony","owner":{"login":"superdav42","id":1534605,"avatar_url":"https://avatars.githubusercontent.com/u/1534605?v=3","gravatar_id":"","url":"https://api.github.com/users/superdav42","html_url":"https://github.com/superdav42","followers_url":"https://api.github.com/users/superdav42/followers","following_url":"https://api.github.com/users/superdav42/following{/other_user}","gists_url":"https://api.github.com/users/superdav42/gists{/gist_id}","starred_url":"https://api.github.com/users/superdav42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdav42/subscriptions","organizations_url":"https://api.github.com/users/superdav42/orgs","repos_url":"https://api.github.com/users/superdav42/repos","events_url":"https://api.github.com/users/superdav42/events{/privacy}","received_events_url":"https://api.github.com/users/superdav42/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/superdav42/symfony","description":"The Symfony PHP framework","fork":true,"url":"https://api.github.com/repos/superdav42/symfony","forks_url":"https://api.github.com/repos/superdav42/symfony/forks","keys_url":"https://api.github.com/repos/superdav42/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/superdav42/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/superdav42/symfony/teams","hooks_url":"https://api.github.com/repos/superdav42/symfony/hooks","issue_events_url":"https://api.github.com/repos/superdav42/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/superdav42/symfony/events","assignees_url":"https://api.github.com/repos/superdav42/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/superdav42/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/superdav42/symfony/tags","blobs_url":"https://api.github.com/repos/superdav42/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/superdav42/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/superdav42/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/superdav42/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/superdav42/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/superdav42/symfony/languages","stargazers_url":"https://api.github.com/repos/superdav42/symfony/stargazers","contributors_url":"https://api.github.com/repos/superdav42/symfony/contributors","subscribers_url":"https://api.github.com/repos/superdav42/symfony/subscribers","subscription_url":"https://api.github.com/repos/superdav42/symfony/subscription","commits_url":"https://api.github.com/repos/superdav42/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/superdav42/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/superdav42/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/superdav42/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/superdav42/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/superdav42/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/superdav42/symfony/merges","archive_url":"https://api.github.com/repos/superdav42/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/superdav42/symfony/downloads","issues_url":"https://api.github.com/repos/superdav42/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/superdav42/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/superdav42/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/superdav42/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/superdav42/symfony/labels{/name}","releases_url":"https://api.github.com/repos/superdav42/symfony/releases{/id}","created_at":"2013-11-15T19:40:06Z","updated_at":"2015-09-10T00:03:49Z","pushed_at":"2015-09-14T15:57:06Z","git_url":"git://github.com/superdav42/symfony.git","ssh_url":"git@github.com:superdav42/symfony.git","clone_url":"https://github.com/superdav42/symfony.git","svn_url":"https://github.com/superdav42/symfony","homepage":"symfony.com","size":59867,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"symfony:2.3","ref":"2.3","sha":"68353a6305159210eb5852494b5a7fb786f703b5","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":458058,"name":"symfony","full_name":"symfony/symfony","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony","description":"The Symfony PHP framework","fork":false,"url":"https://api.github.com/repos/symfony/symfony","forks_url":"https://api.github.com/repos/symfony/symfony/forks","keys_url":"https://api.github.com/repos/symfony/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony/teams","hooks_url":"https://api.github.com/repos/symfony/symfony/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony/events","assignees_url":"https://api.github.com/repos/symfony/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony/tags","blobs_url":"https://api.github.com/repos/symfony/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony/subscription","commits_url":"https://api.github.com/repos/symfony/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony/merges","archive_url":"https://api.github.com/repos/symfony/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony/downloads","issues_url":"https://api.github.com/repos/symfony/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony/releases{/id}","created_at":"2010-01-04T14:21:21Z","updated_at":"2015-09-14T16:09:14Z","pushed_at":"2015-09-14T16:22:23Z","git_url":"git://github.com/symfony/symfony.git","ssh_url":"git@github.com:symfony/symfony.git","clone_url":"https://github.com/symfony/symfony.git","svn_url":"https://github.com/symfony/symfony","homepage":"symfony.com","size":245018,"stargazers_count":10778,"watchers_count":10778,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":4248,"mirror_url":null,"open_issues_count":921,"forks":4248,"open_issues":921,"watchers":10778,"default_branch":"2.8"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/15793"},"html":{"href":"https://github.com/symfony/symfony/pull/15793"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/15793"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/15793/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/15793/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/15793/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/e27f69db26875329207d82b833bc429dd77fc482"}}}}