Sha256: b281d677dcb235e6b82eb3f65c6f42deb0f38615f373d83be296a6350f50dc63
Contents?: true
Size: 516 Bytes
Versions: 8
Compression:
Stored size: 516 Bytes
Contents
# encoding: utf-8 require 'rdiscount' 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={}) extensions = params[:extensions] || [] ::RDiscount.new(content, *extensions).to_html end end end
Version data entries
8 entries across 8 versions & 1 rubygems