Fixed rubocop issues.
This commit is contained in:
parent
e8c32728bb
commit
64ac09b1ae
1 changed files with 3 additions and 3 deletions
|
@ -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(/^(.*)$/, "> \\1") + "\n"
|
"\n" + $2.html2text(true).gsub(/^(.*)$/, '> \1') + "\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
# pre/code handling 2/2
|
# pre/code handling 2/2
|
||||||
|
|
Loading…
Reference in a new issue