0.01
No commit activity in last 3 years
No release in over 3 years
Adds a CodeRay syntax highlighting filter to Haml
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 2
>= 0

Runtime

>= 0
 Project Readme

haml-coderay

Build Status Gem Version

CodeRay filter for Haml. Specify which language to highlight with a shebang followed by the language name:

:coderay
  #!ruby

  if true
    puts "hello"
  end

Use :coderay_raw if you want to disable #{} interpolation.

Encoder

The default encoder and encoder options are :div and {}, respectively, and they can be altered through:

Haml::Filters::CodeRay.encoder
Haml::Filters::CodeRay.encoder_options

For example, if you want to provide your own styling instead of the default inline styling:

Haml::Filters::CodeRay.encoder         = :div
Haml::Filters::CodeRay.encoder_options = { :css => :class }

Installation

gem install haml-coderay