From 64ac09b1ae088446f256a5c08cef4458a4ee76c7 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 2 Sep 2015 09:26:40 +0200 Subject: [PATCH] Fixed rubocop issues. --- lib/core_ext/string.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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!(/(.+?)<\/style>/im, '') + string.gsub!( %r{(.+?)}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