stonean/slim — Issue #201: hamlet syntax
Author: gregwebs
Created: 2011-10-28 04:00:55+00:00
State: open

I think slim is the best template language Ruby has to offer. However, I think there is a similar template language that is even better called hamlet. i ported it to javascript a couple of weeks ago, and the README explains the concept pretty thoroughly: https://github.com/gregwebs/hamlet.js. There is a link to the original Haskell implementation there.

The basic concept is to use opening and closing brackets to delimit a tag and nothing for text (just like html!).

I just hacked this into slim and it seems to work. Code is at: https://github.com/gregwebs/slim/tree/hamlet
I may have screwed up white space or something, I just went through 3 of the test files and got them to work.

Let me know if you are interested in switching to or maintaining an alternate syntax. Otherwise thanks for the awesome code and I will fork it and call it hamlet.rb.