Merge remote-tracking branch 'mjschultz/master'
Conflicts: lib/jekyll/filters.rb
This commit is contained in:
commit
cae0eaf19c
|
@ -12,6 +12,15 @@ module Jekyll
|
|||
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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue