From a881e21f108132a5efff62edb4eb8ed42b8b495a Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 22 Jun 2016 15:11:22 +0200 Subject: [PATCH] Improved html2text. --- lib/core_ext/string.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/core_ext/string.rb b/lib/core_ext/string.rb index 98e592a7e..98b3071d9 100644 --- a/lib/core_ext/string.rb +++ b/lib/core_ext/string.rb @@ -221,6 +221,9 @@ class String # remove tailing empty spaces string.gsub!(/[[:blank:]]+$/, '') + # remove double multiple empty lines + string.gsub!(/\n\n\n/, "\n\n") + # add extracted links if link_list != '' string += "\n\n\n" + link_list