From 1ebce2688157c42921f478fba02af6d4c07c35bd Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 15 Dec 2013 16:08:21 -0500 Subject: [PATCH 1/2] Default Maruku fenced_code_blocks to ON. Extends https://github.com/jekyll/jekyll/pull/1799 --- lib/jekyll/configuration.rb | 3 ++- site/docs/configuration.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index a72e51d8..340847c3 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -49,7 +49,8 @@ module Jekyll 'use_divs' => false, 'png_engine' => 'blahtex', 'png_dir' => 'images/latex', - 'png_url' => '/images/latex' + 'png_url' => '/images/latex', + 'fenced_code_blocks' => true }, 'rdiscount' => { diff --git a/site/docs/configuration.md b/site/docs/configuration.md index df93d9c6..f903adde 100644 --- a/site/docs/configuration.md +++ b/site/docs/configuration.md @@ -316,6 +316,7 @@ maruku: png_engine: blahtex png_dir: images/latex png_url: /images/latex + fenced_code_blocks: true rdiscount: extensions: [] @@ -380,4 +381,4 @@ In addition to the defaults mentioned above, you can also turn on recognition of For example, in your `_config.yml`: kramdown: - input: GFM \ No newline at end of file + input: GFM From d362faea3b89f5ff9f8a3f375578e0e6d29e29b9 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 15 Dec 2013 15:10:17 -0500 Subject: [PATCH 2/2] Add two tests for Maruku fenced code blocks --- features/markdown.feature | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/features/markdown.feature b/features/markdown.feature index a3803233..c76b0611 100644 --- a/features/markdown.feature +++ b/features/markdown.feature @@ -28,3 +28,40 @@ Feature: Markdown And I should see "Index" in "_site/index.html" And I should see "

My Title

" in "_site/index.html" + Scenario: Maruku fenced codeblocks + Given I have a configuration file with "markdown" set to "maruku" + And I have an "index.markdown" file with content: + """ + --- + title: My title + --- + + # My title + + ``` + My awesome code + ``` + """ + When I run jekyll + Then the _site directory should exist + And I should see "My awesome code" in "_site/index.html" + And I should see "
\nMy awesome code\n
" in "_site/index.html" + + Scenario: Maruku fenced codeblocks + Given I have a configuration file with "markdown" set to "maruku" + And I have an "index.markdown" file with content: + """ + --- + title: My title + --- + + # My title + + ```ruby + puts "My awesome string" + ``` + """ + When I run jekyll + Then the _site directory should exist + And I should see "My awesome string" in "_site/index.html" + And I should see "
\nputs "My awesome string"\n
" in "_site/index.html"