BigW Consortium Gitlab

Commit 5eee4775 by Bob Van Landuyt

Correctly indent quotes in new issue description

By using `>`-quote style instead of `>>>`. Also: Update documentation images.
parent 52c0195d
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment