diff --git a/lib/jekyll/converters/markdown/kramdown_parser.rb b/lib/jekyll/converters/markdown/kramdown_parser.rb index 58857276..45542c66 100644 --- a/lib/jekyll/converters/markdown/kramdown_parser.rb +++ b/lib/jekyll/converters/markdown/kramdown_parser.rb @@ -13,7 +13,7 @@ module Jekyll def convert(content) # Check for use of coderay - kramdown_configs = if @config['kramdown']['use_coderay'] + if @config['kramdown']['use_coderay'] base_kramdown_configs.merge({ :coderay_wrap => @config['kramdown']['coderay']['coderay_wrap'], :coderay_line_numbers => @config['kramdown']['coderay']['coderay_line_numbers'], @@ -22,22 +22,11 @@ module Jekyll :coderay_bold_every => @config['kramdown']['coderay']['coderay_bold_every'], :coderay_css => @config['kramdown']['coderay']['coderay_css'] }) - else - # not using coderay - base_kramdown_configs end - Kramdown::Document.new(content, kramdown_configs).to_html + + Kramdown::Document.new(content, @config["kramdown"].symbolize_keys).to_html end - def base_kramdown_configs - { - :auto_ids => @config['kramdown']['auto_ids'], - :footnote_nr => @config['kramdown']['footnote_nr'], - :entity_output => @config['kramdown']['entity_output'], - :toc_levels => @config['kramdown']['toc_levels'], - :smart_quotes => @config['kramdown']['smart_quotes'] - } - end end end end diff --git a/lib/jekyll/core_ext.rb b/lib/jekyll/core_ext.rb index b1192cf4..00f64fcf 100644 --- a/lib/jekyll/core_ext.rb +++ b/lib/jekyll/core_ext.rb @@ -41,6 +41,17 @@ class Hash end array || [] end + + def symbolize_keys! + keys.each do |key| + self[(key.to_sym rescue key) || key] = delete(key) + end + self + end + + def symbolize_keys + dup.symbolize_keys! + end end # Thanks, ActiveSupport! diff --git a/site/docs/configuration.md b/site/docs/configuration.md index ffdbf6ef..7a72394f 100644 --- a/site/docs/configuration.md +++ b/site/docs/configuration.md @@ -236,7 +236,16 @@ before your site is served. Jekyll runs with the following configuration options by default. Unless alternative settings for these options are explicitly specified in the -configuration file or on the command-line, Jekyll will run using these options. +[[configuration]] file or on the command-line, Jekyll will run using these options. + +
+
There are two unsupported kramdown options
+

+ Please note that both remove_block_html_tags and + remove_span_html_tags are currently unsupported in jekyll due to the + fact that they are not included within the kramdown HTML converter. +

+
{% highlight yaml %} source: .