Skip to content

Instantly share code, notes, and snippets.

@rokumatsumoto
Last active February 1, 2019 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rokumatsumoto/da2b0bfd4d50ce62cbf61225355e185d to your computer and use it in GitHub Desktop.
Save rokumatsumoto/da2b0bfd4d50ce62cbf61225355e185d to your computer and use it in GitHub Desktop.
How to know if you are using hamlit
https://github.com/k0kubun/hamlit/issues/108
In Rails
ActionView::Template.handler_for_extension("haml")
=> #<Hamlit::RailsTemplate:0x005593caad2150>
In Sinatra, or any Tilt environment
Tilt["haml"]
=> Hamlit::Template
Or in all environments, you can try to render incompatibility
input
%div{ foo: false }
output in Haml
<div></div>
output in Hamlit
<div foo=''></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment