class Hoe::ManualGen::TextileFilter

A Textile filter for the manual generation tasklib.

Public Class Methods

new( *args ) click to toggle source

Load RedCloth when the filter is first created

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

Public Instance Methods

process( source, *ignored ) click to toggle source

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

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