Sha256: 3ebc59514fb2ab1079eb41476f5e00f8236c7b0f13011c13ab9e77d7d492ac85
Contents?: true
Size: 531 Bytes
Versions: 15
Compression:
Stored size: 531 Bytes
Contents
# encoding: utf-8 require 'coderay' module Nanoc::Filters class CodeRay < Nanoc::Filter # @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
15 entries across 15 versions & 1 rubygems