Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote-tracking branch 'mjschultz/master'

Conflicts:
	lib/jekyll/filters.rb
  • Loading branch information...
commit cae0eaf19ca051cceb7d55067bcd27e14c6e8d14 2 parents 70b1112 + 9e3ad69
@mojombo mojombo authored
Showing with 13 additions and 0 deletions.
  1. +9 −0 lib/jekyll/filters.rb
  2. +4 −0 test/test_filters.rb
View
9 lib/jekyll/filters.rb
@@ -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
4 test/test_filters.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.