Sha256: 151e58be4ff6cdaf7c393fcf4fefd6d09dbd25bc59d2de19a06cf9693b4d2dc0
Contents?: true
Size: 522 Bytes
Versions: 2
Compression:
Stored size: 522 Bytes
Contents
# encoding: utf-8 module Nanoc3::Filters class RDiscount < Nanoc3::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={}) require 'rdiscount' extensions = params[:extensions] || [] ::RDiscount.new(content, *extensions).to_html end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nanoc3-3.1.9 | lib/nanoc3/filters/rdiscount.rb |
nanoc3-3.1.8 | lib/nanoc3/filters/rdiscount.rb |