Sha256: 3102900fa2030799ac123706b67e1a6fe79345d5a1f9712caecd42ad8278a010
Contents?: true
Size: 580 Bytes
Versions: 43
Compression:
Stored size: 580 Bytes
Contents
# frozen_string_literal: true module Nanoc::Filters # @api private class RDiscount < Nanoc::Filter identifier :rdiscount requires 'rdiscount' # Runs the content through [RDiscount](http://github.com/rtomayko/rdiscount). # # @option params [Array] :extensions ([]) 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
43 entries across 43 versions & 1 rubygems