mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 09:10:25 +08:00
FIX: handle multiple paragraphs in email reply when parsing html
This commit is contained in:
parent
c46b9c0ac3
commit
b457005b07
4 changed files with 218 additions and 2 deletions
|
@ -76,7 +76,7 @@ module Email
|
|||
def add_newlines(doc)
|
||||
# Replace <br> tags with a markdown \n
|
||||
doc.xpath('//br').each do |br|
|
||||
br.replace(new_linebreak_node doc)
|
||||
br.replace(new_linebreak_node doc, 2)
|
||||
end
|
||||
# Surround <p> tags with newlines, to help with line-wise postprocessing
|
||||
# and ensure markdown paragraphs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue