wezm.net/lib/smart_rdiscount.rb
2010-03-12 17:45:42 +11:00

13 lines
308 B
Ruby

module WezM::Filters
class SmartRDiscount < Nanoc3::Filter
def run(content, params={})
require 'rdiscount'
markdown = ::RDiscount.new(content)
markdown.smart = true
markdown.to_html
end
end
end
Nanoc3::Filter.register '::WezM::Filters::SmartRDiscount', :smart_rdiscount