Sha256: 9f5401dfc6ef4b6b6b9d9e4555f2599c3bd87808b318db2f0050991f35506288
Contents?: true
Size: 364 Bytes
Versions: 14
Compression:
Stored size: 364 Bytes
Contents
# encoding: utf-8 module Nanoc3::Filters class CodeRay < Nanoc3::Filter def run(content, params={}) require 'coderay' # 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
14 entries across 14 versions & 1 rubygems