Sha256: 00ebb73529adf312b324399c7dc269755000ef25040a07cdd7d24de7a140d2ae
Contents?: true
Size: 514 Bytes
Versions: 15
Compression:
Stored size: 514 Bytes
Contents
# encoding: utf-8 require 'rdiscount' module Nanoc::Filters class RDiscount < Nanoc::Filter # 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
15 entries across 15 versions & 1 rubygems