Sha256: 7f89dc61f70ce67fb4449cdd343807ae4e5b0d0f872740b7df5af4e70e4f17a6

Contents?: true

Size: 802 Bytes

Versions: 11

Compression:

Stored size: 802 Bytes

Contents

HTML::Pipeline.require_dependency('redcloth', 'RedCloth')

module HTML
  class Pipeline
    # HTML Filter that converts Textile text into HTML and converts into a
    # DocumentFragment. This is different from most filters in that it can take a
    # non-HTML as input. It must be used as the first filter in a pipeline.
    #
    # Context options:
    #   :autolink => false    Disable autolinking URLs
    #
    # This filter does not write any additional information to the context hash.
    #
    # NOTE This filter is provided for really old comments only. It probably
    # shouldn't be used for anything new.
    class TextileFilter < TextFilter
      # Convert Textile to HTML and convert into a DocumentFragment.
      def call
        RedCloth.new(@text).to_html
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
html-pipeline-2.11.0 lib/html/pipeline/textile_filter.rb
html-pipeline-2.10.0 lib/html/pipeline/textile_filter.rb
html-pipeline-2.9.2 lib/html/pipeline/textile_filter.rb
html-pipeline-2.9.1 lib/html/pipeline/textile_filter.rb
html-pipeline-2.9.0 lib/html/pipeline/textile_filter.rb
html-pipeline-2.8.4 lib/html/pipeline/textile_filter.rb
html-pipeline-2.8.3 lib/html/pipeline/textile_filter.rb
html-pipeline-2.8.2 lib/html/pipeline/textile_filter.rb
html-pipeline-2.8.1 lib/html/pipeline/textile_filter.rb
html-pipeline-2.8.0 lib/html/pipeline/textile_filter.rb
html-pipeline-2.7.2 lib/html/pipeline/textile_filter.rb