Hoe::ManualGen::

TextileFilter

class
Superclass
Hoe::ManualGen::PageFilter

A Textile filter for the manual generation tasklib.

Public Class Methods

anchor
new( *args )

Load RedCloth when the filter is first created

# File lib/hoe/manualgen.rb, line 522
def initialize( *args )
        require 'redcloth'
        super
end

Public Instance Methods

anchor
process( source, *ignored )

Process the given source as Textile and return the resulting HTML fragment.

# File lib/hoe/manualgen.rb, line 530
def process( source, *ignored )
        formatter = RedCloth::TextileDoc.new( source )
        formatter.hard_breaks = false
        formatter.no_span_caps = true
        return formatter.to_html
end