summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdmin <admin@marx.cafe>2022-12-12 00:28:46 -0500
committerAdmin <admin@marx.cafe>2022-12-12 00:28:46 -0500
commitb6d88468f984dcd1dbaf083e2b3d8f91b27cd0df (patch)
tree168b53311ba9f565a573fdfea7a0dce74a913257
parentda5a5d9ee726438e55e2eb63180bef156adfd30d (diff)
Add strike support
-rwxr-xr-xhtml2md.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/html2md.rb b/html2md.rb
index 97ccfa1..664cfa7 100755
--- a/html2md.rb
+++ b/html2md.rb
@@ -56,6 +56,8 @@ 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 strike
+body.css('strike').each { |strike| strike.replace("~~#{strike.inner_text}~~") }
# Replace horizontal rules
body.css('hr').each { |hr| hr.replace "\n\n---\n\n" }
# Remove carriage returns