Sha256: f0ca952e8b60cc33d8fbe366696757f24abc81650edd6555838d7cd80962385f

Contents?: true

Size: 802 Bytes

Versions: 1

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

1 entries across 1 versions & 1 rubygems

Version Path
html-pipeline-2.7.1 lib/html/pipeline/textile_filter.rb