Sha256: bdb47c2d89bb232982fc491b9ad30599a6bbe5347f62b1ca0cd195362851d4ee

Contents?: true

Size: 519 Bytes

Versions: 2

Compression:

Stored size: 519 Bytes

Contents

# encoding: utf-8

module Nanoc::Filters
  class RDiscount < Nanoc::Filter
    requires 'rdiscount'

    # Runs the content through [RDiscount](http://github.com/rtomayko/rdiscount).
    #
    # @option params [Array] symbol ([]) 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

2 entries across 2 versions & 1 rubygems

Version Path
nanoc-3.8.0 lib/nanoc/filters/rdiscount.rb
nanoc-3.7.5 lib/nanoc/filters/rdiscount.rb