{"action":"created","comment":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/comments/46989038","id":46989038,"diff_hunk":"@@ -17,7 +17,10 @@\n \n   .file-content.code\n     %pre.js-edit-mode-pane#editor\n-      = params[:content] || local_assigns[:blob_data]\n+      - content = params[:content] || local_assigns[:blob_data]\n+      = content\n+      - if content.length && 0 === content[content.length-1].index(/[\\r\\n]/)","path":"app/views/projects/blob/_editor.html.haml","position":7,"original_position":7,"commit_id":"5450437c0339194247a350239fc75b0e0608a0d4","original_commit_id":"5450437c0339194247a350239fc75b0e0608a0d4","user":{"login":"stanhu","id":963826,"avatar_url":"https://avatars.githubusercontent.com/u/963826?v=3","gravatar_id":"","url":"https://api.github.com/users/stanhu","html_url":"https://github.com/stanhu","followers_url":"https://api.github.com/users/stanhu/followers","following_url":"https://api.github.com/users/stanhu/following{/other_user}","gists_url":"https://api.github.com/users/stanhu/gists{/gist_id}","starred_url":"https://api.github.com/users/stanhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanhu/subscriptions","organizations_url":"https://api.github.com/users/stanhu/orgs","repos_url":"https://api.github.com/users/stanhu/repos","events_url":"https://api.github.com/users/stanhu/events{/privacy}","received_events_url":"https://api.github.com/users/stanhu/received_events","type":"User","site_admin":false},"body":"I did some cursory debugging and found the right number of newlines get sent from the UI editor to the controller. Is the issue that the view is truncating the last newline if it's there?","created_at":"2015-12-08T18:01:38Z","updated_at":"2015-12-08T18:01:38Z","html_url":"https://github.com/gitlabhq/gitlabhq/pull/9884#discussion_r46989038","pull_request_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/9884","_links":{"self":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/comments/46989038"},"html":{"href":"https://github.com/gitlabhq/gitlabhq/pull/9884#discussion_r46989038"},"pull_request":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/9884"}}},"pull_request":{"url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/9884","id":52649895,"html_url":"https://github.com/gitlabhq/gitlabhq/pull/9884","diff_url":"https://github.com/gitlabhq/gitlabhq/pull/9884.diff","patch_url":"https://github.com/gitlabhq/gitlabhq/pull/9884.patch","issue_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/9884","number":9884,"state":"open","locked":false,"title":"#9035 + #5936 Rebase","user":{"login":"kylekatarnls","id":5966783,"avatar_url":"https://avatars.githubusercontent.com/u/5966783?v=3","gravatar_id":"","url":"https://api.github.com/users/kylekatarnls","html_url":"https://github.com/kylekatarnls","followers_url":"https://api.github.com/users/kylekatarnls/followers","following_url":"https://api.github.com/users/kylekatarnls/following{/other_user}","gists_url":"https://api.github.com/users/kylekatarnls/gists{/gist_id}","starred_url":"https://api.github.com/users/kylekatarnls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylekatarnls/subscriptions","organizations_url":"https://api.github.com/users/kylekatarnls/orgs","repos_url":"https://api.github.com/users/kylekatarnls/repos","events_url":"https://api.github.com/users/kylekatarnls/events{/privacy}","received_events_url":"https://api.github.com/users/kylekatarnls/received_events","type":"User","site_admin":false},"body":"Rebase the patch branch","created_at":"2015-12-04T10:02:51Z","updated_at":"2015-12-08T18:01:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fb17cd7d0fbb999f78b196c719d816af681e871b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/9884/commits","review_comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/9884/comments","review_comment_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/9884/comments","statuses_url":"https://api.github.com/repos/gitlabhq/gitlabhq/statuses/5450437c0339194247a350239fc75b0e0608a0d4","head":{"label":"kylekatarnls:patch-2","ref":"patch-2","sha":"5450437c0339194247a350239fc75b0e0608a0d4","user":{"login":"kylekatarnls","id":5966783,"avatar_url":"https://avatars.githubusercontent.com/u/5966783?v=3","gravatar_id":"","url":"https://api.github.com/users/kylekatarnls","html_url":"https://github.com/kylekatarnls","followers_url":"https://api.github.com/users/kylekatarnls/followers","following_url":"https://api.github.com/users/kylekatarnls/following{/other_user}","gists_url":"https://api.github.com/users/kylekatarnls/gists{/gist_id}","starred_url":"https://api.github.com/users/kylekatarnls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylekatarnls/subscriptions","organizations_url":"https://api.github.com/users/kylekatarnls/orgs","repos_url":"https://api.github.com/users/kylekatarnls/repos","events_url":"https://api.github.com/users/kylekatarnls/events{/privacy}","received_events_url":"https://api.github.com/users/kylekatarnls/received_events","type":"User","site_admin":false},"repo":{"id":34758306,"name":"gitlabhq","full_name":"kylekatarnls/gitlabhq","owner":{"login":"kylekatarnls","id":5966783,"avatar_url":"https://avatars.githubusercontent.com/u/5966783?v=3","gravatar_id":"","url":"https://api.github.com/users/kylekatarnls","html_url":"https://github.com/kylekatarnls","followers_url":"https://api.github.com/users/kylekatarnls/followers","following_url":"https://api.github.com/users/kylekatarnls/following{/other_user}","gists_url":"https://api.github.com/users/kylekatarnls/gists{/gist_id}","starred_url":"https://api.github.com/users/kylekatarnls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylekatarnls/subscriptions","organizations_url":"https://api.github.com/users/kylekatarnls/orgs","repos_url":"https://api.github.com/users/kylekatarnls/repos","events_url":"https://api.github.com/users/kylekatarnls/events{/privacy}","received_events_url":"https://api.github.com/users/kylekatarnls/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kylekatarnls/gitlabhq","description":"GitLab is version control for your server","fork":true,"url":"https://api.github.com/repos/kylekatarnls/gitlabhq","forks_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/forks","keys_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/teams","hooks_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/hooks","issue_events_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/issues/events{/number}","events_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/events","assignees_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/assignees{/user}","branches_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/branches{/branch}","tags_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/tags","blobs_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/git/refs{/sha}","trees_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/statuses/{sha}","languages_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/languages","stargazers_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/stargazers","contributors_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/contributors","subscribers_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/subscribers","subscription_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/subscription","commits_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/commits{/sha}","git_commits_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/git/commits{/sha}","comments_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/comments{/number}","issue_comment_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/issues/comments{/number}","contents_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/contents/{+path}","compare_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/merges","archive_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/downloads","issues_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/issues{/number}","pulls_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/pulls{/number}","milestones_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/milestones{/number}","notifications_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/labels{/name}","releases_url":"https://api.github.com/repos/kylekatarnls/gitlabhq/releases{/id}","created_at":"2015-04-28T22:03:05Z","updated_at":"2015-04-28T22:03:13Z","pushed_at":"2015-08-05T13:02:02Z","git_url":"git://github.com/kylekatarnls/gitlabhq.git","ssh_url":"git@github.com:kylekatarnls/gitlabhq.git","clone_url":"https://github.com/kylekatarnls/gitlabhq.git","svn_url":"https://github.com/kylekatarnls/gitlabhq","homepage":"https://gitlab.com/gitlab-org/gitlab-ce/tree/master","size":98284,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"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":"gitlabhq:master","ref":"master","sha":"abf54f230ef7ff80c0ca1baa6a3c4c3d0cbb7869","user":{"login":"gitlabhq","id":1086321,"avatar_url":"https://avatars.githubusercontent.com/u/1086321?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlabhq","html_url":"https://github.com/gitlabhq","followers_url":"https://api.github.com/users/gitlabhq/followers","following_url":"https://api.github.com/users/gitlabhq/following{/other_user}","gists_url":"https://api.github.com/users/gitlabhq/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlabhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlabhq/subscriptions","organizations_url":"https://api.github.com/users/gitlabhq/orgs","repos_url":"https://api.github.com/users/gitlabhq/repos","events_url":"https://api.github.com/users/gitlabhq/events{/privacy}","received_events_url":"https://api.github.com/users/gitlabhq/received_events","type":"Organization","site_admin":false},"repo":{"id":2500088,"name":"gitlabhq","full_name":"gitlabhq/gitlabhq","owner":{"login":"gitlabhq","id":1086321,"avatar_url":"https://avatars.githubusercontent.com/u/1086321?v=3","gravatar_id":"","url":"https://api.github.com/users/gitlabhq","html_url":"https://github.com/gitlabhq","followers_url":"https://api.github.com/users/gitlabhq/followers","following_url":"https://api.github.com/users/gitlabhq/following{/other_user}","gists_url":"https://api.github.com/users/gitlabhq/gists{/gist_id}","starred_url":"https://api.github.com/users/gitlabhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitlabhq/subscriptions","organizations_url":"https://api.github.com/users/gitlabhq/orgs","repos_url":"https://api.github.com/users/gitlabhq/repos","events_url":"https://api.github.com/users/gitlabhq/events{/privacy}","received_events_url":"https://api.github.com/users/gitlabhq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gitlabhq/gitlabhq","description":"GitLab is version control for your server","fork":false,"url":"https://api.github.com/repos/gitlabhq/gitlabhq","forks_url":"https://api.github.com/repos/gitlabhq/gitlabhq/forks","keys_url":"https://api.github.com/repos/gitlabhq/gitlabhq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gitlabhq/gitlabhq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gitlabhq/gitlabhq/teams","hooks_url":"https://api.github.com/repos/gitlabhq/gitlabhq/hooks","issue_events_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/events{/number}","events_url":"https://api.github.com/repos/gitlabhq/gitlabhq/events","assignees_url":"https://api.github.com/repos/gitlabhq/gitlabhq/assignees{/user}","branches_url":"https://api.github.com/repos/gitlabhq/gitlabhq/branches{/branch}","tags_url":"https://api.github.com/repos/gitlabhq/gitlabhq/tags","blobs_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/refs{/sha}","trees_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gitlabhq/gitlabhq/statuses/{sha}","languages_url":"https://api.github.com/repos/gitlabhq/gitlabhq/languages","stargazers_url":"https://api.github.com/repos/gitlabhq/gitlabhq/stargazers","contributors_url":"https://api.github.com/repos/gitlabhq/gitlabhq/contributors","subscribers_url":"https://api.github.com/repos/gitlabhq/gitlabhq/subscribers","subscription_url":"https://api.github.com/repos/gitlabhq/gitlabhq/subscription","commits_url":"https://api.github.com/repos/gitlabhq/gitlabhq/commits{/sha}","git_commits_url":"https://api.github.com/repos/gitlabhq/gitlabhq/git/commits{/sha}","comments_url":"https://api.github.com/repos/gitlabhq/gitlabhq/comments{/number}","issue_comment_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/comments{/number}","contents_url":"https://api.github.com/repos/gitlabhq/gitlabhq/contents/{+path}","compare_url":"https://api.github.com/repos/gitlabhq/gitlabhq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gitlabhq/gitlabhq/merges","archive_url":"https://api.github.com/repos/gitlabhq/gitlabhq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gitlabhq/gitlabhq/downloads","issues_url":"https://api.github.com/repos/gitlabhq/gitlabhq/issues{/number}","pulls_url":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls{/number}","milestones_url":"https://api.github.com/repos/gitlabhq/gitlabhq/milestones{/number}","notifications_url":"https://api.github.com/repos/gitlabhq/gitlabhq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gitlabhq/gitlabhq/labels{/name}","releases_url":"https://api.github.com/repos/gitlabhq/gitlabhq/releases{/id}","created_at":"2011-10-02T16:25:27Z","updated_at":"2015-12-08T15:29:52Z","pushed_at":"2015-12-08T17:51:49Z","git_url":"git://github.com/gitlabhq/gitlabhq.git","ssh_url":"git@github.com:gitlabhq/gitlabhq.git","clone_url":"https://github.com/gitlabhq/gitlabhq.git","svn_url":"https://github.com/gitlabhq/gitlabhq","homepage":"https://gitlab.com/gitlab-org/gitlab-ce/tree/master","size":124677,"stargazers_count":16901,"watchers_count":16901,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4584,"mirror_url":null,"open_issues_count":189,"forks":4584,"open_issues":189,"watchers":16901,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/9884"},"html":{"href":"https://github.com/gitlabhq/gitlabhq/pull/9884"},"issue":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/9884"},"comments":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/issues/9884/comments"},"review_comments":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/9884/comments"},"review_comment":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/pulls/9884/commits"},"statuses":{"href":"https://api.github.com/repos/gitlabhq/gitlabhq/statuses/5450437c0339194247a350239fc75b0e0608a0d4"}}}}