diff --git a/features/markdown.feature b/features/markdown.feature index c76b0611..778fc5d2 100644 --- a/features/markdown.feature +++ b/features/markdown.feature @@ -13,8 +13,8 @@ Feature: Markdown When I run jekyll Then the _site directory should exist And I should see "Index" in "_site/index.html" - And I should see "

My Title

" in "_site/2009/03/27/hackers.html" - And I should see "

My Title

" in "_site/index.html" + And I should see "

My Title

" in "_site/2009/03/27/hackers.html" + And I should see "

My Title

" in "_site/index.html" Scenario: Markdown in pagination on index Given I have a configuration file with "paginate" set to "5" @@ -26,7 +26,7 @@ Feature: Markdown When I run jekyll Then the _site directory should exist And I should see "Index" in "_site/index.html" - And I should see "

My Title

" 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" diff --git a/lib/jekyll/configuration.rb b/lib/jekyll/configuration.rb index afa43d30..9566a295 100644 --- a/lib/jekyll/configuration.rb +++ b/lib/jekyll/configuration.rb @@ -28,7 +28,7 @@ module Jekyll 'relative_permalinks' => true, # backwards-compatibility with < 1.0 # will be set to false once 2.0 hits - 'markdown' => 'maruku', + 'markdown' => 'kramdown', 'highlighter' => 'pygments', 'permalink' => 'date', 'baseurl' => '/', @@ -229,6 +229,12 @@ module Jekyll config[option] = csv_to_array(config[option]) end end + + if config.fetch('markdown', 'kramdown').to_s.downcase.eql?("maruku") + Jekyll::Deprecator.deprecation_message "You're using the 'maruku' " + + "Markdown processor. Maruku support has been deprecated and will " + + "be removed in 3.0.0. We recommend you switch to Kramdown." + end config end diff --git a/site/docs/configuration.md b/site/docs/configuration.md index 8ca54f86..ca6ea87e 100644 --- a/site/docs/configuration.md +++ b/site/docs/configuration.md @@ -300,7 +300,7 @@ permalink: date paginate_path: 'page:num' paginate: nil -markdown: maruku +markdown: kramdown markdown_ext: markdown,mkd,mkdn,md textile_ext: textile diff --git a/test/source/_includes/sig.markdown b/test/source/_includes/sig.markdown index d280e8cc..fbbf563a 100644 --- a/test/source/_includes/sig.markdown +++ b/test/source/_includes/sig.markdown @@ -1,3 +1,3 @@ --- +--- Tom Preston-Werner -github.com/mojombo \ No newline at end of file +github.com/mojombo diff --git a/test/test_configuration.rb b/test/test_configuration.rb index a96141fa..a390da81 100644 --- a/test/test_configuration.rb +++ b/test/test_configuration.rb @@ -4,14 +4,14 @@ class TestConfiguration < Test::Unit::TestCase context "#stringify_keys" do setup do @mixed_keys = Configuration[{ - 'markdown' => 'maruku', + 'markdown' => 'kramdown', :permalink => 'date', 'baseurl' => '/', :include => ['.htaccess'], :source => './' }] @string_keys = Configuration[{ - 'markdown' => 'maruku', + 'markdown' => 'kramdown', 'permalink' => 'date', 'baseurl' => '/', 'include' => ['.htaccess'], diff --git a/test/test_excerpt.rb b/test/test_excerpt.rb index 5255551c..43fe9b43 100644 --- a/test/test_excerpt.rb +++ b/test/test_excerpt.rb @@ -108,7 +108,7 @@ class TestExcerpt < Test::Unit::TestCase end should "be the first paragraph of the page" do - assert_equal "

First paragraph with link ref.

", @extracted_excerpt.content + assert_equal "

First paragraph with link ref.

\n\n", @extracted_excerpt.content end should "link properly" do diff --git a/test/test_filters.rb b/test/test_filters.rb index 4b5c8212..7f71c41b 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -28,7 +28,7 @@ class TestFilters < Test::Unit::TestCase end should "markdownify with simple string" do - assert_equal "

something really simple

", @filter.markdownify("something **really** simple") + assert_equal "

something really simple

\n", @filter.markdownify("something **really** simple") end should "convert array to sentence string with no args" do diff --git a/test/test_post.rb b/test/test_post.rb index c159afe8..528004cd 100644 --- a/test/test_post.rb +++ b/test/test_post.rb @@ -312,7 +312,7 @@ class TestPost < Test::Unit::TestCase end should "return rendered HTML" do - assert_equal "

First paragraph with link ref.

", + assert_equal "

First paragraph with link ref.

\n\n", @post.excerpt end @@ -532,7 +532,7 @@ class TestPost < Test::Unit::TestCase post.site.source = File.join(File.dirname(__FILE__), 'source') do_render(post) - assert_equal "<<<
\n

Tom Preston-Werner github.com/mojombo

\n\n

This is cool

>>>", post.output + assert_equal "<<<
\n

Tom Preston-Werner\ngithub.com/mojombo

\n\n

This is cool

\n >>>", post.output end should "render date specified in front matter properly" do diff --git a/test/test_tags.rb b/test/test_tags.rb index efc108bd..4874fda0 100644 --- a/test/test_tags.rb +++ b/test/test_tags.rb @@ -54,7 +54,7 @@ CONTENT end context "initialized tag" do - should "work" do + should "set the correct options" do tag = Jekyll::Tags::HighlightBlock.new('highlight', 'ruby ', ["test", "{% endhighlight %}", "\n"]) assert_equal({}, tag.instance_variable_get(:@options)) @@ -85,11 +85,11 @@ CONTENT end should "render markdown with pygments" do - assert_match %{
test\n
}, @result + assert_match %{
test\n
}, @result end should "render markdown with pygments with line numbers" do - assert_match %{
1 test\n
}, @result + assert_match %{
1 test\n
}, @result end end @@ -99,7 +99,7 @@ CONTENT end should "not embed the file" do - assert_match %{
./jekyll.gemspec\n
}, @result + assert_match %{
./jekyll.gemspec\n
}, @result end end @@ -109,7 +109,7 @@ CONTENT end should "render markdown with pygments line handling" do - assert_match %{
Æ\n
}, @result + assert_match %{
Æ\n
}, @result end end @@ -268,7 +268,7 @@ CONTENT end should "write script tag" do - assert_match "", @result + assert_match "", @result end end @@ -288,7 +288,7 @@ CONTENT end should "write script tag with specific file in gist" do - assert_match "", @result + assert_match "", @result end end @@ -324,7 +324,7 @@ CONTENT end should "write script tag with specific file in gist" do - assert_match "", @result + assert_match "", @result end end @@ -378,11 +378,11 @@ CONTENT end should "correctly output include variable" do - assert_match "value", @result.strip + assert_match "value", @result.strip end should "ignore parameters if unused" do - assert_match "
\n

Tom Preston-Werner github.com/mojombo

\n", @result + assert_match "
\n

Tom Preston-Werner\ngithub.com/mojombo

\n", @result end end @@ -430,7 +430,7 @@ CONTENT end should "not include previously used parameters" do - assert_match "", @result + assert_match "", @result end end @@ -447,7 +447,7 @@ CONTENT end should "include file with empty parameters" do - assert_match "", @result + assert_match "", @result end end @@ -464,7 +464,7 @@ CONTENT end should "include file with empty parameters within if statement" do - assert_match "", @result + assert_match "", @result end end @@ -477,6 +477,7 @@ puts "Hello world" ``` CONTENT create_post(content, { + 'markdown' => 'maruku', 'maruku' => {'fenced_code_blocks' => true}} ) end