Merge pull request #4958 from pathawks/markdownify-to_s
Merge pull request 4958
This commit is contained in:
		
						commit
						e367f13f72
					
				|  | @ -13,7 +13,7 @@ module Jekyll | ||||||
|     def markdownify(input) |     def markdownify(input) | ||||||
|       site = @context.registers[:site] |       site = @context.registers[:site] | ||||||
|       converter = site.find_converter_instance(Jekyll::Converters::Markdown) |       converter = site.find_converter_instance(Jekyll::Converters::Markdown) | ||||||
|       converter.convert(input) |       converter.convert(input.to_s) | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|     # Convert quotes into smart quotes. |     # Convert quotes into smart quotes. | ||||||
|  | @ -24,7 +24,7 @@ module Jekyll | ||||||
|     def smartify(input) |     def smartify(input) | ||||||
|       site = @context.registers[:site] |       site = @context.registers[:site] | ||||||
|       converter = site.find_converter_instance(Jekyll::Converters::SmartyPants) |       converter = site.find_converter_instance(Jekyll::Converters::SmartyPants) | ||||||
|       converter.convert(input) |       converter.convert(input.to_s) | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|     # Convert a Sass string into CSS output. |     # Convert a Sass string into CSS output. | ||||||
|  |  | ||||||
|  | @ -40,6 +40,13 @@ class TestFilters < JekyllUnitTest | ||||||
|       ) |       ) | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|  |     should "markdownify with a number" do | ||||||
|  |       assert_equal( | ||||||
|  |         "<p>404</p>\n", | ||||||
|  |         @filter.markdownify(404) | ||||||
|  |       ) | ||||||
|  |     end | ||||||
|  | 
 | ||||||
|     context "smartify filter" do |     context "smartify filter" do | ||||||
|       should "convert quotes and typographic characters" do |       should "convert quotes and typographic characters" do | ||||||
|         assert_equal( |         assert_equal( | ||||||
|  | @ -81,6 +88,13 @@ class TestFilters < JekyllUnitTest | ||||||
|         assert_equal "5 > 4", @filter.smartify("5 > 4") |         assert_equal "5 > 4", @filter.smartify("5 > 4") | ||||||
|         assert_equal "This & that", @filter.smartify("This & that") |         assert_equal "This & that", @filter.smartify("This & that") | ||||||
|       end |       end | ||||||
|  | 
 | ||||||
|  |       should "convert a number to a string" do | ||||||
|  |         assert_equal( | ||||||
|  |           "404", | ||||||
|  |           @filter.smartify(404) | ||||||
|  |         ) | ||||||
|  |       end | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|     should "sassify with simple string" do |     should "sassify with simple string" do | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue