Sha256: 7a04241d4fa47e7379d2e9873f6d9903cb031b38ed36a41a5fe72fd80f39ebd4
Contents?: true
Size: 536 Bytes
Versions: 8
Compression:
Stored size: 536 Bytes
Contents
# encoding: utf-8 module Nanoc::Filters class CodeRay < Nanoc::Filter requires 'coderay' # @deprecated Use the `:colorize_syntax` filter instead. def run(content, params={}) # Warn warn 'The :coderay filter is deprecated; consider using the :colorize_syntax filter instead.' # Check params raise ArgumentError, "CodeRay filter requires a :language argument which is missing" if params[:language].nil? # Get result ::CodeRay.scan(content, params[:language]).html end end end
Version data entries
8 entries across 8 versions & 1 rubygems