diff options
-rwxr-xr-x | html2md.rb | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -53,8 +53,8 @@ end # Replace italics body.css('i').each { |i| i.replace("*#{i.inner_text}*") } body.css('em').each { |i| i.replace("*#{i.inner_text}*") } -# Remove horizontal rules -body.css('hr').remove +# Replace horizontal rules +body.css('hr').each { |hr| hr.replace "\n\n---\n\n" } # Remove carriage returns body.search('//text()').each do |text| text.replace(text.text.gsub("\r", '')) |