- added rdiscount filter for templating system (like the textilize filter, but for markdown)

This commit is contained in:
Michael J Schultz 2011-03-03 08:14:52 -06:00
parent b3634b522a
commit 9e3ad69922
2 changed files with 8 additions and 0 deletions

View File

@ -7,6 +7,10 @@ module Jekyll
TextileConverter.new.convert(input)
end
def rdiscount(input)
RDiscount.new(input).to_html
end
def date_to_string(date)
date.strftime("%d %b %Y")
end

View File

@ -14,6 +14,10 @@ class TestFilters < Test::Unit::TestCase
assert_equal "<p>something <strong>really</strong> simple</p>", @filter.textilize("something *really* simple")
end
should "rdiscount with simple string" do
assert_equal "<p>something <strong>really</strong> simple</p>\n", @filter.rdiscount("something **really** simple")
end
should "convert array to sentence string with no args" do
assert_equal "", @filter.array_to_sentence_string([])
end