Correctly indent quotes in new issue description
By using `>`-quote style instead of `>>>`. Also: Update documentation images.
This commit is contained in:
parent
52c0195dcc
commit
5eee47758c
|
@ -43,7 +43,8 @@ module Issues
|
||||||
discussion_info << " (+#{other_note_count} #{'comment'.pluralize(other_note_count)})" if other_note_count > 0
|
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
|
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")
|
[discussion_info, quote].join("\n\n")
|
||||||
end
|
end
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 172 KiB After Width: | Height: | Size: 210 KiB |
Binary file not shown.
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 140 KiB |
|
@ -57,11 +57,11 @@ describe Issues::BuildService, services: true do
|
||||||
"with a blockquote\n"\
|
"with a blockquote\n"\
|
||||||
"> That has a quote\n"\
|
"> That has a quote\n"\
|
||||||
">>>\n"
|
">>>\n"
|
||||||
note_result = "This is a string\n"\
|
note_result = " > This is a string\n"\
|
||||||
"> with a blockquote\n"\
|
" > > with a blockquote\n"\
|
||||||
"> > That has a quote\n"
|
" > > > That has a quote\n"
|
||||||
discussion = Discussion.new([create(:diff_note_on_merge_request, note: note_text)])
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue