commit
9f1593299a
|
@ -13,8 +13,8 @@ Feature: Markdown
|
||||||
When I run jekyll
|
When I run jekyll
|
||||||
Then the _site directory should exist
|
Then the _site directory should exist
|
||||||
And I should see "Index" in "_site/index.html"
|
And I should see "Index" in "_site/index.html"
|
||||||
And I should see "<h1 id='my_title'>My Title</h1>" in "_site/2009/03/27/hackers.html"
|
And I should see "<h1 id=\"my_title\">My Title</h1>" in "_site/2009/03/27/hackers.html"
|
||||||
And I should see "<h1 id='my_title'>My Title</h1>" in "_site/index.html"
|
And I should see "<h1 id=\"my_title\">My Title</h1>" in "_site/index.html"
|
||||||
|
|
||||||
Scenario: Markdown in pagination on index
|
Scenario: Markdown in pagination on index
|
||||||
Given I have a configuration file with "paginate" set to "5"
|
Given I have a configuration file with "paginate" set to "5"
|
||||||
|
@ -26,5 +26,5 @@ Feature: Markdown
|
||||||
When I run jekyll
|
When I run jekyll
|
||||||
Then the _site directory should exist
|
Then the _site directory should exist
|
||||||
And I should see "Index" in "_site/index.html"
|
And I should see "Index" in "_site/index.html"
|
||||||
And I should see "<h1 id='my_title'>My Title</h1>" in "_site/index.html"
|
And I should see "<h1 id=\"my_title\">My Title</h1>" in "_site/index.html"
|
||||||
|
|
|
@ -67,28 +67,28 @@ Feature: Site configuration
|
||||||
And I have a configuration file with "markdown" set to "rdiscount"
|
And I have a configuration file with "markdown" set to "rdiscount"
|
||||||
When I run jekyll
|
When I run jekyll
|
||||||
Then the _site directory should exist
|
Then the _site directory should exist
|
||||||
And I should see "<a href="http://google.com">Google</a>" in "_site/index.html"
|
And I should see "<a href=\"http://google.com\">Google</a>" in "_site/index.html"
|
||||||
|
|
||||||
Scenario: Use Kramdown for markup
|
Scenario: Use Kramdown for markup
|
||||||
Given I have an "index.markdown" page that contains "[Google](http://google.com)"
|
Given I have an "index.markdown" page that contains "[Google](http://google.com)"
|
||||||
And I have a configuration file with "markdown" set to "kramdown"
|
And I have a configuration file with "markdown" set to "kramdown"
|
||||||
When I run jekyll
|
When I run jekyll
|
||||||
Then the _site directory should exist
|
Then the _site directory should exist
|
||||||
And I should see "<a href="http://google.com">Google</a>" in "_site/index.html"
|
And I should see "<a href=\"http://google.com\">Google</a>" in "_site/index.html"
|
||||||
|
|
||||||
Scenario: Use Redcarpet for markup
|
Scenario: Use Redcarpet for markup
|
||||||
Given I have an "index.markdown" page that contains "[Google](http://google.com)"
|
Given I have an "index.markdown" page that contains "[Google](http://google.com)"
|
||||||
And I have a configuration file with "markdown" set to "redcarpet"
|
And I have a configuration file with "markdown" set to "redcarpet"
|
||||||
When I run jekyll
|
When I run jekyll
|
||||||
Then the _site directory should exist
|
Then the _site directory should exist
|
||||||
And I should see "<a href="http://google.com">Google</a>" in "_site/index.html"
|
And I should see "<a href=\"http://google.com\">Google</a>" in "_site/index.html"
|
||||||
|
|
||||||
Scenario: Use Maruku for markup
|
Scenario: Use Maruku for markup
|
||||||
Given I have an "index.markdown" page that contains "[Google](http://google.com)"
|
Given I have an "index.markdown" page that contains "[Google](http://google.com)"
|
||||||
And I have a configuration file with "markdown" set to "maruku"
|
And I have a configuration file with "markdown" set to "maruku"
|
||||||
When I run jekyll
|
When I run jekyll
|
||||||
Then the _site directory should exist
|
Then the _site directory should exist
|
||||||
And I should see "<a href='http://google.com'>Google</a>" in "_site/index.html"
|
And I should see "<a href=\"http://google.com\">Google</a>" in "_site/index.html"
|
||||||
|
|
||||||
Scenario: Highlight code with pygments
|
Scenario: Highlight code with pygments
|
||||||
Given I have an "index.html" file that contains "{% highlight ruby %} puts 'Hello world!' {% endhighlight %}"
|
Given I have an "index.html" file that contains "{% highlight ruby %} puts 'Hello world!' {% endhighlight %}"
|
||||||
|
|
|
@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
||||||
s.add_runtime_dependency('liquid', "~> 2.5.2")
|
s.add_runtime_dependency('liquid', "~> 2.5.2")
|
||||||
s.add_runtime_dependency('classifier', "~> 1.3")
|
s.add_runtime_dependency('classifier', "~> 1.3")
|
||||||
s.add_runtime_dependency('listen', "~> 1.3")
|
s.add_runtime_dependency('listen', "~> 1.3")
|
||||||
s.add_runtime_dependency('maruku', "~> 0.6.0")
|
s.add_runtime_dependency('maruku', "~> 0.7.0")
|
||||||
s.add_runtime_dependency('pygments.rb', "~> 0.5.0")
|
s.add_runtime_dependency('pygments.rb', "~> 0.5.0")
|
||||||
s.add_runtime_dependency('commander', "~> 4.1.3")
|
s.add_runtime_dependency('commander', "~> 4.1.3")
|
||||||
s.add_runtime_dependency('safe_yaml', "~> 0.9.7")
|
s.add_runtime_dependency('safe_yaml', "~> 0.9.7")
|
||||||
|
|
|
@ -41,7 +41,7 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def convert(content)
|
def convert(content)
|
||||||
converted = Maruku.new(content, :error_stream => @errors).to_html
|
converted = Maruku.new(content, :error_stream => @errors).to_html.strip
|
||||||
print_errors_and_fail unless @errors.empty?
|
print_errors_and_fail unless @errors.empty?
|
||||||
converted
|
converted
|
||||||
end
|
end
|
||||||
|
|
|
@ -66,7 +66,7 @@ class TestExcerpt < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
should "be the first paragraph of the page" do
|
should "be the first paragraph of the page" do
|
||||||
assert_equal "<p>First paragraph with <a href='http://www.jekyllrb.com/'>link ref</a>.</p>", @extracted_excerpt.content
|
assert_equal "<p>First paragraph with <a href=\"http://www.jekyllrb.com/\">link ref</a>.</p>", @extracted_excerpt.content
|
||||||
end
|
end
|
||||||
|
|
||||||
should "link properly" do
|
should "link properly" do
|
||||||
|
|
|
@ -284,7 +284,7 @@ class TestPost < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
should "return rendered HTML" do
|
should "return rendered HTML" do
|
||||||
assert_equal "<p>First paragraph with <a href='http://www.jekyllrb.com/'>link ref</a>.</p>",
|
assert_equal "<p>First paragraph with <a href=\"http://www.jekyllrb.com/\">link ref</a>.</p>",
|
||||||
@post.excerpt
|
@post.excerpt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -252,7 +252,7 @@ CONTENT
|
||||||
end
|
end
|
||||||
|
|
||||||
should "write script tag" do
|
should "write script tag" do
|
||||||
assert_match "<script src='https://gist.github.com/#{@gist}.js'>\s</script>", @result
|
assert_match "<script src='https://gist.github.com/#{@gist}.js'><![CDATA[\s]]></script>", @result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ CONTENT
|
||||||
end
|
end
|
||||||
|
|
||||||
should "write script tag with specific file in gist" do
|
should "write script tag with specific file in gist" do
|
||||||
assert_match "<script src='https://gist.github.com/#{@gist}.js?file=#{@filename}'>\s</script>", @result
|
assert_match "<script src='https://gist.github.com/#{@gist}.js?file=#{@filename}'><![CDATA[\s]]></script>", @result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ CONTENT
|
||||||
end
|
end
|
||||||
|
|
||||||
should "write script tag with specific file in gist" do
|
should "write script tag with specific file in gist" do
|
||||||
assert_match "<script src='https://gist.github.com/#{@gist}.js?file=#{@filename}'>\s</script>", @result
|
assert_match "<script src='https://gist.github.com/#{@gist}.js?file=#{@filename}'><![CDATA[\s]]></script>", @result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue