Permalink
Browse files

Merge remote-tracking branch 'mjschultz/master'

Conflicts:
	lib/jekyll/filters.rb
  • Loading branch information...
2 parents 70b1112 + 9e3ad69 commit cae0eaf19ca051cceb7d55067bcd27e14c6e8d14 @mojombo mojombo committed May 30, 2011
Showing with 13 additions and 0 deletions.
  1. +9 −0 lib/jekyll/filters.rb
  2. +4 −0 test/test_filters.rb
View
@@ -12,6 +12,15 @@ def textilize(input)
TextileConverter.new.convert(input)
end
+ # Convert a Markdown string into HTML output using RDiscount.
+ #
+ # input - The Markdown String to convert.
+ #
+ # Returns the HTML formatted String.
+ def rdiscount(input)
+ RDiscount.new(input).to_html
+ end
+
# Format a date in short format e.g. "27 Jan 2011".
#
# date - the Time to format.
View
@@ -14,6 +14,10 @@ class JekyllFilter
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

0 comments on commit cae0eaf

Please sign in to comment.