parent
93b5b57aea
commit
18d33b1fd6
|
@ -22,6 +22,8 @@ module Jekyll
|
|||
raise Errors::FatalException, "Bailing out; invalid Markdown processor."
|
||||
end
|
||||
|
||||
@cache = Jekyll::Cache.new("Jekyll::Converters::Markdown")
|
||||
|
||||
@setup = true
|
||||
end
|
||||
|
||||
|
@ -89,7 +91,9 @@ module Jekyll
|
|||
# Returns a String of the converted content.
|
||||
def convert(content)
|
||||
setup
|
||||
@parser.convert(content)
|
||||
@cache.getset(content) do
|
||||
@parser.convert(content)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -32,6 +32,7 @@ class TestKramdown < JekyllUnitTest
|
|||
@config = Jekyll.configuration(@config)
|
||||
@markdown = Converters::Markdown.new(@config)
|
||||
@markdown.setup
|
||||
Jekyll::Cache.clear
|
||||
end
|
||||
|
||||
should "fill symbolized keys into config for compatibility with kramdown" do
|
||||
|
@ -94,7 +95,7 @@ class TestKramdown < JekyllUnitTest
|
|||
MARKDOWN
|
||||
div_highlight = ">div.highlight"
|
||||
selector = "div.highlighter-rouge#{div_highlight}>pre.highlight>code"
|
||||
refute result.css(selector).empty?
|
||||
refute(result.css(selector).empty?, result.to_html)
|
||||
end
|
||||
|
||||
context "when a custom highlighter is chosen" do
|
||||
|
|
Loading…
Reference in New Issue