diff options
-rwxr-xr-x | html2md.rb | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -98,4 +98,7 @@ body_text = if body.at_css('blockquote > div.border') body.children.to_html end +# Fix cases where <em> or <i> tags contain trailing whitespace +body_text.gsub!(/(\*\b[^*]+) +(\*+)/, '\1\2 ') + puts body_text.lines.map(&:strip).join("\n").gsub(/\n\n\n+/, "\n\n") |