class Rote::Filters::RedCloth
Page
filter that converts Textile formatting to HTML using RedCloth
.
Note that, although RedCloth
provides partial Markdown support, it is *highly recommended* that the BlueCloth
filter be applied to markdown pages instead of this one.
Public Class Methods
new(*redcloth_opts)
click to toggle source
Create a new filter instance. The supplied options are passed directly to RedCloth
. See RedCloth
docs for a full list.
If no options are supplied, full textile support is provided.
Calls superclass method
Rote::Filters::TextFilter::new
# File lib/rote/filters/redcloth.rb 28 def initialize(*redcloth_opts) 29 super() 30 @redcloth_opts = redcloth_opts 31 end
Public Instance Methods
handler(text,page)
click to toggle source
# File lib/rote/filters/redcloth.rb 33 def handler(text,page) 34 rc = ::RedCloth.new(text, @redcloth_opts) 35 rc.to_html 36 end