Sha256: 84a635d442af5ed127e410060ff683a196e6941b88bd52fb7c486605e3c7f602

Contents?: true

Size: 549 Bytes

Versions: 20

Compression:

Stored size: 549 Bytes

Contents

module Nanoc::Filters
  # @api private
  class RDiscount < Nanoc::Filter
    identifier :rdiscount

    requires 'rdiscount'

    # Runs the content through [RDiscount](http://github.com/rtomayko/rdiscount).
    #
    # @option params [Array] :extensions ([]) A list of RDiscount extensions
    #
    # @param [String] content The content to filter
    #
    # @return [String] The filtered content
    def run(content, params = {})
      extensions = params[:extensions] || []

      ::RDiscount.new(content, *extensions).to_html
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
nanoc-4.7.9 lib/nanoc/filters/rdiscount.rb
nanoc-4.7.8 lib/nanoc/filters/rdiscount.rb
nanoc-4.7.7 lib/nanoc/filters/rdiscount.rb
nanoc-4.7.6 lib/nanoc/filters/rdiscount.rb
nanoc-4.7.5 lib/nanoc/filters/rdiscount.rb
nanoc-4.7.4 lib/nanoc/filters/rdiscount.rb
nanoc-4.7.3 lib/nanoc/filters/rdiscount.rb
nanoc-4.7.2 lib/nanoc/filters/rdiscount.rb
nanoc-4.7.1 lib/nanoc/filters/rdiscount.rb
nanoc-4.7.0 lib/nanoc/filters/rdiscount.rb
nanoc-4.6.4 lib/nanoc/filters/rdiscount.rb
nanoc-4.6.3 lib/nanoc/filters/rdiscount.rb
nanoc-4.6.2 lib/nanoc/filters/rdiscount.rb
nanoc-4.6.1 lib/nanoc/filters/rdiscount.rb
nanoc-4.6.0 lib/nanoc/filters/rdiscount.rb
nanoc-4.5.4 lib/nanoc/filters/rdiscount.rb
nanoc-4.5.3 lib/nanoc/filters/rdiscount.rb
nanoc-4.5.2 lib/nanoc/filters/rdiscount.rb
nanoc-4.5.1 lib/nanoc/filters/rdiscount.rb
nanoc-4.5.0 lib/nanoc/filters/rdiscount.rb