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.
Methods
Public Class methods
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.
[ show source ]
# File lib/rote/filters/redcloth.rb, line 28
28: def initialize(*redcloth_opts)
29: super()
30: @redcloth_opts = redcloth_opts
31: end
Public Instance methods
[ show source ]
# File lib/rote/filters/redcloth.rb, line 33
33: def handler(text,page)
34: rc = ::RedCloth.new(text)
35: # hack around a RedCloth warning
36: rc.instance_eval { @lite_mode = false }
37: rc.to_html(*@redcloth_opts)
38: end