Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Refactoring to read simplier

  • Loading branch information...
commit bbf9877dc63bc9677bc9d3c52ec4306645976882 1 parent 64e9cc5
Kurtis Rainbolt-Greene authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/rocco.rb
View
7 lib/rocco.rb
@@ -462,10 +462,9 @@ def highlight_pygmentize(code)
# Pygments is not one of those things that's trivial for a ruby user to install,
# so we'll fall back on a webservice to highlight the code if it isn't available.
def highlight_webservice(code)
- Net::HTTP.post_form(
- URI.parse('http://pygments.appspot.com/'),
- {'lang' => @options[:language], 'code' => code}
- ).body
+ url = URI.parse 'http://pygments.appspot.com/'
+ options = { 'lang' => @options[:language], 'code' => code}
+ Net::HTTP.post_form(url, options).body
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.