diff --git a/lib/core_ext/string.rb b/lib/core_ext/string.rb index 9bfdad828..5b3a37e47 100644 --- a/lib/core_ext/string.rb +++ b/lib/core_ext/string.rb @@ -98,7 +98,7 @@ class String end # remove style tags with content - string.gsub!(/}im, '') # remove empty lines string.gsub!( /^\s*/m, '' ) @@ -115,8 +115,8 @@ class String string.gsub!(/(\n\r|\r\r\n|\r\n|\n)/, '') # blockquote handling - string.gsub!( %r{
]*)>(.+?)}m ) { |placeholder| - placeholder = "\n" + $2.html2text(true).gsub(/^(.*)$/, "> \\1") + "\n" + string.gsub!( %r{
]*)>(.+?)}m ) { + "\n" + $2.html2text(true).gsub(/^(.*)$/, '> \1') + "\n" } # pre/code handling 2/2