mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-18 12:52:47 +00:00
13 lines
308 B
Ruby
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
|