Sha256: 8f90a8d919b9d5e65b3868683183629d19230a0d514ae0d3396a258b2bacc14b
Contents?: true
Size: 533 Bytes
Versions: 8
Compression:
Stored size: 533 Bytes
Contents
# encoding: utf-8 require 'coderay' module Nanoc3::Filters class CodeRay < Nanoc3::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
8 entries across 8 versions & 1 rubygems