From 4c5dfa1391eada0cbd8b0c8e686c438dcc9b8b51 Mon Sep 17 00:00:00 2001 From: Fabian Rodriguez Date: Thu, 27 Mar 2014 19:49:41 -0300 Subject: [PATCH 1/3] remove unused variables --- lib/jekyll/converters/markdown/redcarpet_parser.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/converters/markdown/redcarpet_parser.rb b/lib/jekyll/converters/markdown/redcarpet_parser.rb index cf6c88ca..edbfaf9a 100644 --- a/lib/jekyll/converters/markdown/redcarpet_parser.rb +++ b/lib/jekyll/converters/markdown/redcarpet_parser.rb @@ -16,7 +16,7 @@ module Jekyll def block_code(code, lang) require 'pygments' lang = lang && lang.split.first || "text" - output = add_code_tags( + add_code_tags( Pygments.highlight(code, :lexer => lang, :options => { :encoding => 'utf-8' }), lang ) @@ -34,7 +34,7 @@ module Jekyll def block_code(code, lang) lang = lang && lang.split.first || "text" - output = add_code_tags(code_wrap(code), lang) + add_code_tags(code_wrap(code), lang) end end From adcfde14eda8db13ec9135bbd09e61d353b366d5 Mon Sep 17 00:00:00 2001 From: Fabian Rodriguez Date: Thu, 27 Mar 2014 19:52:52 -0300 Subject: [PATCH 2/3] align 'end' with 'def' --- lib/jekyll/site.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index a285a053..5ff9442f 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -174,7 +174,7 @@ module Jekyll aggregate_post_info(post) end end - end + end # Read all the files in //_drafts and create a new Post # object with each one. From 302bc469143a49bbac7f85741bd2e329a522a752 Mon Sep 17 00:00:00 2001 From: Fabian Rodriguez Date: Thu, 27 Mar 2014 19:53:28 -0300 Subject: [PATCH 3/3] rename variable inside block --- lib/jekyll/site.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 5ff9442f..5e1877c7 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -275,7 +275,7 @@ module Jekyll def post_attr_hash(post_attr) # Build a hash map based on the specified post attribute ( post attr => # array of posts ) then sort each array in reverse order. - hash = Hash.new { |hash, key| hash[key] = [] } + hash = Hash.new { |h, key| h[key] = [] } posts.each { |p| p.send(post_attr.to_sym).each { |t| hash[t] << p } } hash.values.map { |sortme| sortme.sort! { |a, b| b <=> a } } hash