Skip to content

Commit

Permalink
bump kramdown to 1.14.0 for rouge 2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Crunch09 committed Jun 26, 2017
1 parent 530d800 commit 3c7547a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -70,7 +70,7 @@ group :jekyll_optional_dependencies do
gem "jekyll-gist"
gem "jekyll-paginate"
gem "jekyll-redirect-from"
gem "kramdown", "~> 1.9"
gem "kramdown", "~> 1.14", ">= 1.14.0"
gem "mime-types", "~> 3.0"
gem "rdoc", "~> 5.0"
gem "toml", "~> 0.1.0"
Expand Down
2 changes: 1 addition & 1 deletion jekyll.gemspec
Expand Up @@ -34,7 +34,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency("colorator", "~> 1.0")
s.add_runtime_dependency("jekyll-sass-converter", "~> 1.0")
s.add_runtime_dependency("jekyll-watch", "~> 1.1")
s.add_runtime_dependency("kramdown", "~> 1.3")
s.add_runtime_dependency("kramdown", "~> 1.14", ">= 1.14.0")
s.add_runtime_dependency("liquid", "~> 4.0")
s.add_runtime_dependency("mercenary", "~> 0.3.3")
s.add_runtime_dependency("pathutil", "~> 0.9")
Expand Down
36 changes: 36 additions & 0 deletions test/test_tags.rb
Expand Up @@ -343,6 +343,42 @@ def highlight_block_with_opts(options_string)
end
end

context "post content has raw tag" do
setup do
content = <<-CONTENT
---
title: This is a test
---
```liquid
{% raw %}
{{ site.baseurl }}{% link _collection/name-of-document.md %}
{% endraw %}
```
CONTENT
create_post(content)
end

should "render markdown with rouge 1" do
skip "Skipped because using a newer version of Rouge" unless Utils::Rouge.old_api?

assert_match(
%(<div class="language-liquid highlighter-rouge"><pre class="highlight"><code>),
@result
)
end

should "render markdown with rouge 2" do
skip "Skipped because using an older version of Rouge" if Utils::Rouge.old_api?

assert_match(
%(<div class="language-liquid highlighter-rouge">) +
%(<div class="highlight"><pre class="highlight"><code>),
@result
)
end
end

context "post content has highlight with file reference" do
setup do
fill_post("./jekyll.gemspec")
Expand Down

0 comments on commit 3c7547a

Please sign in to comment.