diff options
| author | connorshea <connor.james.shea@gmail.com> | 2016-04-11 15:27:07 -0600 |
|---|---|---|
| committer | Connor Shea <connor.james.shea@gmail.com> | 2016-06-22 16:09:51 -0600 |
| commit | 80f576bb8aaab83ca78a21f20c03cb4b4fb18f11 (patch) | |
| tree | 0675078c6192026dfeac14fab6631a2a0de71f76 /config/initializers/hamlit.rb | |
| parent | 69479d3615df62c0c6c22fe20263413505b2ef8f (diff) | |
| download | gitlab-ce-80f576bb8aaab83ca78a21f20c03cb4b4fb18f11.tar.gz | |
Replace Haml with Hamlit.
Hamlit is a library that's faster than Haml while implementing most of its features: https://github.com/k0kubun/hamlit
Not sure if this breaks anything, but as far as I can tell most things work the same. No obvious regressions that I've been able to find.
Diffstat (limited to 'config/initializers/hamlit.rb')
| -rw-r--r-- | config/initializers/hamlit.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/config/initializers/hamlit.rb b/config/initializers/hamlit.rb new file mode 100644 index 00000000000..259d562e586 --- /dev/null +++ b/config/initializers/hamlit.rb @@ -0,0 +1,15 @@ +module Hamlit + class TemplateHandler + def call(template) + Engine.new( + generator: Temple::Generators::RailsOutputBuffer, + attr_quote: '"', + ).call(template.source) + end + end +end + +ActionView::Template.register_template_handler( + :haml, + Hamlit::TemplateHandler.new, +) |
