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