Fixed rubocop issues.

This commit is contained in:
Martin Edenhofer 2015-09-02 09:26:40 +02:00
parent e8c32728bb
commit 64ac09b1ae

View file

@ -98,7 +98,7 @@ class String
end end
# remove style tags with content # remove style tags with content
string.gsub!(/<style(|\s.+?)>(.+?)<\/style>/im, '') string.gsub!( %r{<style(|\s.+?)>(.+?)</style>}im, '')
# remove empty lines # remove empty lines
string.gsub!( /^\s*/m, '' ) string.gsub!( /^\s*/m, '' )
@ -115,8 +115,8 @@ class String
string.gsub!(/(\n\r|\r\r\n|\r\n|\n)/, '') string.gsub!(/(\n\r|\r\r\n|\r\n|\n)/, '')
# blockquote handling # blockquote handling
string.gsub!( %r{<blockquote(| [^>]*)>(.+?)</blockquote>}m ) { |placeholder| string.gsub!( %r{<blockquote(| [^>]*)>(.+?)</blockquote>}m ) {
placeholder = "\n" + $2.html2text(true).gsub(/^(.*)$/, "&gt; \\1") + "\n" "\n" + $2.html2text(true).gsub(/^(.*)$/, '&gt; \1') + "\n"
} }
# pre/code handling 2/2 # pre/code handling 2/2