FIX: handle multiple paragraphs in email reply when parsing html

This commit is contained in:
Arpit Jalan
2014-10-08 19:45:46 +05:30
parent c46b9c0ac3
commit b457005b07
4 changed files with 218 additions and 2 deletions

View File

@ -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