diff options
author | Admin <admin@marx.cafe> | 2022-12-12 00:01:44 -0500 |
---|---|---|
committer | Admin <admin@marx.cafe> | 2022-12-12 00:01:44 -0500 |
commit | da5a5d9ee726438e55e2eb63180bef156adfd30d (patch) | |
tree | 029e1efa2a8ced59f5aa7c2b9db932ecedc3b8c9 | |
parent | 2da850df43bedf54d2c1f90d7a134711cb8cf5a6 (diff) |
Add bold html to markdown support
-rwxr-xr-x | html2md.rb | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -53,6 +53,9 @@ end # Replace italics body.css('i').each { |i| i.replace("*#{i.inner_text}*") } body.css('em').each { |i| i.replace("*#{i.inner_text}*") } +# Replace bold +body.css('b').each { |b| i.replace("**#{b.inner_text}**") } +body.css('strong').each { |b| i.replace("**#{b.inner_text}**") } # Replace horizontal rules body.css('hr').each { |hr| hr.replace "\n\n---\n\n" } # Remove carriage returns |