diff --git a/lib/jekyll/filters.rb b/lib/jekyll/filters.rb index 3356eadf..26ee3d5d 100644 --- a/lib/jekyll/filters.rb +++ b/lib/jekyll/filters.rb @@ -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 diff --git a/test/test_filters.rb b/test/test_filters.rb index 0897fbc2..7071c15a 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -14,6 +14,10 @@ class TestFilters < Test::Unit::TestCase assert_equal "
something really simple
", @filter.textilize("something *really* simple") end + should "rdiscount with simple string" do + assert_equal "something really simple
\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