Sha256: 3c86f3b9137f699b1940e49a67f79d2006cd58c73482e8e0ce7310f7c95c25e5

Contents?: true

Size: 481 Bytes

Versions: 3

Compression:

Stored size: 481 Bytes

Contents

# encoding: utf-8

module Nanoc::Filters
  class Kramdown < Nanoc::Filter

    requires 'kramdown'

    # Runs the content through [Kramdown](http://kramdown.gettalong.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

3 entries across 3 versions & 1 rubygems

Version Path
nanoc-3.7.4 lib/nanoc/filters/kramdown.rb
nanoc-3.7.3 lib/nanoc/filters/kramdown.rb
nanoc-3.7.2 lib/nanoc/filters/kramdown.rb