Sha256: dfeac54efe8f8ab7e3aead992a19e887507c57cddeee9fa86c0b47e979abcef6

Contents?: true

Size: 476 Bytes

Versions: 8

Compression:

Stored size: 476 Bytes

Contents

# encoding: utf-8

require 'kramdown'

module Nanoc3::Filters
  class Kramdown < Nanoc3::Filter

    # Runs the content through [Kramdown](http://kramdown.rubyforge.org/).
    # Parameters passed to this filter will be passed on to Kramdown.
    #
    # @param [String] content The content to filter
    #
    # @return [String] The filtered content
    def run(content, params={})
      # Get result
      ::Kramdown::Document.new(content, params).to_html
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
nanoc3-3.2.4 lib/nanoc3/filters/kramdown.rb
nanoc3-3.2.3 lib/nanoc3/filters/kramdown.rb
nanoc3-3.2.2 lib/nanoc3/filters/kramdown.rb
nanoc3-3.2.1 lib/nanoc3/filters/kramdown.rb
nanoc3-3.2.0 lib/nanoc3/filters/kramdown.rb
nanoc3-3.2.0b3 lib/nanoc3/filters/kramdown.rb
nanoc3-3.2.0b2 lib/nanoc3/filters/kramdown.rb
nanoc3-3.2.0b1 lib/nanoc3/filters/kramdown.rb