Fix leading spaces being stripped in Markdown code blocks

Fixes #1776
This commit is contained in:
Claire 2022-05-24 10:24:59 +02:00
parent 06de3a17f8
commit fe65c0e44f

View File

@ -8,7 +8,7 @@ class AdvancedTextFormatter < TextFormatter
end
def block_code(code, _language)
<<~HTML.squish
<<~HTML
<pre><code>#{ERB::Util.h(code).gsub("\n", '<br/>')}</code></pre>
HTML
end