2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

replace indentation with non-breaking spaces when cooking emails

This commit is contained in:
Gerhard Schlager 2017-11-18 16:50:27 +01:00
parent 32dd1e66be
commit 546b206da0
2 changed files with 24 additions and 0 deletions

View file

@ -47,6 +47,8 @@ class EmailCook
quote_buffer = ""
text.each_line do |line|
# replace indentation with non-breaking spaces
line.sub!(/^\s{2,}/) { |s| "\u00A0" * s.length }
if line =~ /^\s*>/
in_quote = true