diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index 46c3365c..53e0bf4f 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -212,8 +212,11 @@ module Jekyll if config.has_key? 'pygments' Jekyll.logger.warn "Deprecation:", "The 'pygments' configuration option" + " has been renamed to 'highlighter'. Please update your" + - " config file accordingly. The allowed values are 'rouge"+ + " config file accordingly. The allowed values are 'rouge', " + "'pygments' or null" + + config['highlighter'] = 'pygments' if config['pygments'] + config.delete('pygments') end %w[include exclude].each do |option| diff --git a/test/test_configuration.rb b/test/test_configuration.rb index d911b779..36e6cb1d 100644 --- a/test/test_configuration.rb +++ b/test/test_configuration.rb @@ -51,11 +51,12 @@ class TestConfiguration < Test::Unit::TestCase context "#backwards_compatibilize" do setup do @config = Configuration[{ - "auto" => true, - "watch" => true, - "server" => true, - "exclude" => "READ-ME.md, Gemfile,CONTRIBUTING.hello.markdown", - "include" => "STOP_THE_PRESSES.txt,.heloses, .git" + "auto" => true, + "watch" => true, + "server" => true, + "exclude" => "READ-ME.md, Gemfile,CONTRIBUTING.hello.markdown", + "include" => "STOP_THE_PRESSES.txt,.heloses, .git", + "pygments" => true, }] end should "unset 'auto' and 'watch'" do @@ -78,6 +79,11 @@ class TestConfiguration < Test::Unit::TestCase assert @config.backwards_compatibilize.has_key?("include") assert_equal @config.backwards_compatibilize["include"], %w[STOP_THE_PRESSES.txt .heloses .git] end + should "set highlighter to pygments" do + assert @config.has_key?("pygments") + assert !@config.backwards_compatibilize.has_key?("pygments") + assert_equal @config.backwards_compatibilize["highlighter"], "pygments" + end end context "#fix_common_issues" do setup do