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:
parent
32dd1e66be
commit
546b206da0
2 changed files with 24 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue