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