diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-03-08 00:55:50 +0100 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-03-13 08:27:51 +0100 |
commit | 5eee47758ccba75e2d1d7fa1c30b98a4c2820108 (patch) | |
tree | 3a9ffd12a641f76b97b155ad167fbdbcff009f1a | |
parent | 52c0195dccb7057dab5ecce74d2095ddb80c1b53 (diff) | |
download | gitlab-ce-5eee47758ccba75e2d1d7fa1c30b98a4c2820108.tar.gz |
Correctly indent quotes in new issue description
By using `>`-quote style instead of `>>>`.
Also: Update documentation images.
-rw-r--r-- | app/services/issues/build_service.rb | 3 | ||||
-rw-r--r-- | doc/user/project/merge_requests/img/preview_issue_for_discussion.png | bin | 176569 -> 214794 bytes | |||
-rw-r--r-- | doc/user/project/merge_requests/img/preview_issue_for_discussions.png | bin | 178361 -> 143871 bytes | |||
-rw-r--r-- | spec/services/issues/build_service_spec.rb | 8 |
4 files changed, 6 insertions, 5 deletions
diff --git a/app/services/issues/build_service.rb b/app/services/issues/build_service.rb index 540ed0f98c2..3d4b6b055c4 100644 --- a/app/services/issues/build_service.rb +++ b/app/services/issues/build_service.rb @@ -43,7 +43,8 @@ module Issues discussion_info << " (+#{other_note_count} #{'comment'.pluralize(other_note_count)})" if other_note_count > 0 note_without_block_quotes = Banzai::Filter::BlockquoteFenceFilter.new(first_note.note).call - quote = ">>>\n#{note_without_block_quotes}\n>>>" + spaces = ' ' * 4 + quote = note_without_block_quotes.lines.map { |line| "#{spaces}> #{line}" }.join [discussion_info, quote].join("\n\n") end diff --git a/doc/user/project/merge_requests/img/preview_issue_for_discussion.png b/doc/user/project/merge_requests/img/preview_issue_for_discussion.png Binary files differindex 798365aa4db..b38cf7d5c66 100644 --- a/doc/user/project/merge_requests/img/preview_issue_for_discussion.png +++ b/doc/user/project/merge_requests/img/preview_issue_for_discussion.png diff --git a/doc/user/project/merge_requests/img/preview_issue_for_discussions.png b/doc/user/project/merge_requests/img/preview_issue_for_discussions.png Binary files differindex 9fdd387676c..3fe0a666678 100644 --- a/doc/user/project/merge_requests/img/preview_issue_for_discussions.png +++ b/doc/user/project/merge_requests/img/preview_issue_for_discussions.png diff --git a/spec/services/issues/build_service_spec.rb b/spec/services/issues/build_service_spec.rb index 76417279923..79b093e51fb 100644 --- a/spec/services/issues/build_service_spec.rb +++ b/spec/services/issues/build_service_spec.rb @@ -57,11 +57,11 @@ describe Issues::BuildService, services: true do "with a blockquote\n"\ "> That has a quote\n"\ ">>>\n" - note_result = "This is a string\n"\ - "> with a blockquote\n"\ - "> > That has a quote\n" + note_result = " > This is a string\n"\ + " > > with a blockquote\n"\ + " > > > That has a quote\n" discussion = Discussion.new([create(:diff_note_on_merge_request, note: note_text)]) - expect(service.item_for_discussion(discussion)).to include(">>>\n#{note_result}\n>>>") + expect(service.item_for_discussion(discussion)).to include(note_result) end end |