diff --git a/lib/jekyll/converters/markdown.rb b/lib/jekyll/converters/markdown.rb index e6efabf5..bb7b7ffa 100644 --- a/lib/jekyll/converters/markdown.rb +++ b/lib/jekyll/converters/markdown.rb @@ -19,9 +19,9 @@ module Jekyll def get_processor case @config["markdown"].downcase - when "redcarpet" then return RedcarpetParser.new(@config) - when "kramdown" then return KramdownParser.new(@config) - when "rdiscount" then return RDiscountParser.new(@config) + when "redcarpet" then return RedcarpetParser.new(@config) + when "kramdown" then return KramdownParser.new(@config) + when "rdiscount" then return RDiscountParser.new(@config) else get_custom_processor end diff --git a/lib/jekyll/frontmatter_defaults.rb b/lib/jekyll/frontmatter_defaults.rb index edf70969..877f517e 100644 --- a/lib/jekyll/frontmatter_defaults.rb +++ b/lib/jekyll/frontmatter_defaults.rb @@ -13,19 +13,20 @@ module Jekyll def update_deprecated_types(set) return set unless set.key?('scope') && set['scope'].key?('type') - set['scope']['type'] = case set['scope']['type'] - when 'page' - Deprecator.defaults_deprecate_type('page', 'pages') - 'pages' - when 'post' - Deprecator.defaults_deprecate_type('post', 'posts') - 'posts' - when 'draft' - Deprecator.defaults_deprecate_type('draft', 'drafts') - 'drafts' - else - set['scope']['type'] - end + set['scope']['type'] = + case set['scope']['type'] + when 'page' + Deprecator.defaults_deprecate_type('page', 'pages') + 'pages' + when 'post' + Deprecator.defaults_deprecate_type('post', 'posts') + 'posts' + when 'draft' + Deprecator.defaults_deprecate_type('draft', 'drafts') + 'drafts' + else + set['scope']['type'] + end set end diff --git a/lib/jekyll/readers/data_reader.rb b/lib/jekyll/readers/data_reader.rb index cbb24be3..870fc2dc 100644 --- a/lib/jekyll/readers/data_reader.rb +++ b/lib/jekyll/readers/data_reader.rb @@ -50,13 +50,13 @@ module Jekyll # Returns the contents of the data file. def read_data_file(path) case File.extname(path).downcase - when '.csv' - CSV.read(path, { - :headers => true, - :encoding => site.config['encoding'] - }).map(&:to_hash) - else - SafeYAML.load_file(path) + when '.csv' + CSV.read(path, { + :headers => true, + :encoding => site.config['encoding'] + }).map(&:to_hash) + else + SafeYAML.load_file(path) end end diff --git a/lib/jekyll/utils.rb b/lib/jekyll/utils.rb index 0760d9e3..1d81e0f0 100644 --- a/lib/jekyll/utils.rb +++ b/lib/jekyll/utils.rb @@ -164,16 +164,17 @@ module Jekyll end # Replace each character sequence with a hyphen - re = case mode - when 'raw' - SLUGIFY_RAW_REGEXP - when 'default' - SLUGIFY_DEFAULT_REGEXP - when 'pretty' - # "._~!$&'()+,;=@" is human readable (not URI-escaped) in URL - # and is allowed in both extN and NTFS. - SLUGIFY_PRETTY_REGEXP - end + re = + case mode + when 'raw' + SLUGIFY_RAW_REGEXP + when 'default' + SLUGIFY_DEFAULT_REGEXP + when 'pretty' + # "._~!$&'()+,;=@" is human readable (not URI-escaped) in URL + # and is allowed in both extN and NTFS. + SLUGIFY_PRETTY_REGEXP + end # Strip according to the mode slug = string.gsub(re, '-')