diff options
author | Admin <admin@marx.cafe> | 2022-12-11 01:40:59 -0500 |
---|---|---|
committer | Admin <admin@marx.cafe> | 2022-12-11 01:40:59 -0500 |
commit | 3c047aeec360c973df60887e4b4e454e0effd137 (patch) | |
tree | 65264db2d839ba621df65ba001d1ffcae8cc5baf | |
parent | e151ddc9b6e4dff08619402d4415ac26d1a15836 (diff) |
Leave horizontal rules
-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", '')) |