Class: Rote::Filters::RedCloth
- Inherits:
-
TextFilter
- Object
- TextFilter
- Rote::Filters::RedCloth
- Defined in:
- lib/rote/filters/redcloth.rb
Overview
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.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from TextFilter
Instance Method Summary collapse
- #handler(text, page) ⇒ Object
-
#initialize(*redcloth_opts) ⇒ RedCloth
constructor
Create a new filter instance.
Methods inherited from TextFilter
Constructor Details
#initialize(*redcloth_opts) ⇒ RedCloth
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.
28 29 30 31 |
# File 'lib/rote/filters/redcloth.rb', line 28 def initialize(*redcloth_opts) super() @redcloth_opts = redcloth_opts end |
Instance Method Details
#handler(text, page) ⇒ Object
33 34 35 36 |
# File 'lib/rote/filters/redcloth.rb', line 33 def handler(text,page) rc = ::RedCloth.new(text, @redcloth_opts) rc.to_html end |