1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00
HTML Abstraction Markup Language - A Markup Haiku
Find a file
2015-03-30 20:40:27 +09:00
benchmarks Fix benchmark 2015-03-30 20:19:07 +09:00
bin Add hamlit cli 2015-03-15 13:54:54 +09:00
lib Add coffee filter 2015-03-30 20:15:48 +09:00
spec Add coffee filter 2015-03-30 20:15:48 +09:00
.gitignore Integrate with tilt and add sass filter 2015-03-30 20:15:46 +09:00
.rspec Revert "Fix bundle exec rspec to work" 2015-03-29 00:11:36 +09:00
Gemfile Name the gem "hamlit" 2015-03-15 00:08:47 +09:00
hamlit.gemspec Add coffee filter 2015-03-30 20:15:48 +09:00
LICENSE.txt Make plain text parser better 2015-03-30 14:12:02 +09:00
Rakefile Refactor Rakefile 2015-03-29 22:15:18 +09:00
README.md Update README.md 2015-03-30 20:40:27 +09:00
wercker.yml Increase CI benchmark iteration 2015-03-30 20:15:46 +09:00

Hamlit wercker status

Hamlit is a high performance haml implementation.

Installation

Add this line to your application's Gemfile:

gem 'hamlit'

or just replace gem "haml" with gem "hamlit".

Features

Fast rendering

Hamlit's rendering is 7.0x times faster than original haml.

   hamlit:    94047.0 i/s
   erubis:    87136.3 i/s - 1.08x slower
     slim:    83996.0 i/s - 1.12x slower
     faml:    68861.1 i/s - 1.37x slower
     haml:    13428.6 i/s - 7.00x slower

This benchmark is the same as slim-template/slim's one for fairness.

Better parser

Haml's attribute parser is not so good. For example, raises syntax error for %a{ b: '}' }. Hamlit's attribute parser is implemented with Ripper, which is an official lexer for Ruby, so it can able to parse such an attribute.

Passing haml-spec

haml/haml-spec is a basic suite of tests for Haml interpreters. For all test cases in haml-spec, Hamlit behaves the same as Haml (ugly mode only, which is used on production).

License

MIT License