class Nanoc::Filters::Kramdown

@api private

Public Instance Methods

run(content, params = {}) click to toggle source

Runs the content through [Kramdown](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

# File lib/nanoc/filters/kramdown.rb, line 12
def run(content, params = {})
  document = ::Kramdown::Document.new(content, params)

  document.warnings.each do |warning|
    $stderr.puts "kramdown warning: #{warning}"
  end

  document.to_html
end