{"action":"created","issue":{"url":"https://api.github.com/repos/padrino/padrino-framework/issues/2115","repository_url":"https://api.github.com/repos/padrino/padrino-framework","labels_url":"https://api.github.com/repos/padrino/padrino-framework/issues/2115/labels{/name}","comments_url":"https://api.github.com/repos/padrino/padrino-framework/issues/2115/comments","events_url":"https://api.github.com/repos/padrino/padrino-framework/issues/2115/events","html_url":"https://github.com/padrino/padrino-framework/issues/2115","id":199837506,"number":2115,"title":"support `hamlit` as alternative HAML implementation?","user":{"login":"fnordfish","id":12839,"avatar_url":"https://avatars.githubusercontent.com/u/12839?v=3","gravatar_id":"","url":"https://api.github.com/users/fnordfish","html_url":"https://github.com/fnordfish","followers_url":"https://api.github.com/users/fnordfish/followers","following_url":"https://api.github.com/users/fnordfish/following{/other_user}","gists_url":"https://api.github.com/users/fnordfish/gists{/gist_id}","starred_url":"https://api.github.com/users/fnordfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnordfish/subscriptions","organizations_url":"https://api.github.com/users/fnordfish/orgs","repos_url":"https://api.github.com/users/fnordfish/repos","events_url":"https://api.github.com/users/fnordfish/events{/privacy}","received_events_url":"https://api.github.com/users/fnordfish/received_events","type":"User","site_admin":false},"labels":[{"id":23892472,"url":"https://api.github.com/repos/padrino/padrino-framework/labels/feature","name":"feature","color":"d7e102","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-01-10T14:36:32Z","updated_at":"2017-01-12T17:01:48Z","closed_at":null,"body":"I was trying to replace \"haml\" with [hamlit](https://github.com/k0kubun/hamlit) in one of my padrino projects.\r\n\r\nHamlit is supposed to be a [limited](https://github.com/k0kubun/hamlit/blob/master/REFERENCE.md#limitations) drop in replacement. But somehow it does not work due to padrino's own management of template renders(?).\r\n\r\nMy fail-fast try looked like this:\r\n\r\n```ruby\r\nmodule Padrino::Helpers::OutputHelpers\r\n  class HamlHandler\r\n    def engine_matches?(block)\r\n      eval('!!defined?(_hamlit_compiler1)', block.binding)\r\n    end\r\n\r\n    def capture_from_template(*args, &block)\r\n      super.html_safe\r\n    end\r\nend\r\n```\r\n\r\n... which almost worked aside from tag helpers:\r\n\r\n\r\n```html\r\n&lt;div class=&#39;form-group&#39;&gt;\r\n&lt;label class=&#39;col-lg-2 control-label&#39; for=&#39;email&#39;&gt;Email&lt;/label&gt;\r\n&lt;div class=&#39;col-lg-10&#39;&gt;<input type=\"email\" name=\"email\" id=\"email\" autofocus=\"autofocus\" class=\"form-control\" />&lt;/div&gt;\r\n&lt;/div&gt;\r\n```\r\n\r\nAny ideas? (I also accept \"Do not use hamlit - it won't work with the admin\" is an answer :))"},"comment":{"url":"https://api.github.com/repos/padrino/padrino-framework/issues/comments/272220107","html_url":"https://github.com/padrino/padrino-framework/issues/2115#issuecomment-272220107","issue_url":"https://api.github.com/repos/padrino/padrino-framework/issues/2115","id":272220107,"user":{"login":"fnordfish","id":12839,"avatar_url":"https://avatars.githubusercontent.com/u/12839?v=3","gravatar_id":"","url":"https://api.github.com/users/fnordfish","html_url":"https://github.com/fnordfish","followers_url":"https://api.github.com/users/fnordfish/followers","following_url":"https://api.github.com/users/fnordfish/following{/other_user}","gists_url":"https://api.github.com/users/fnordfish/gists{/gist_id}","starred_url":"https://api.github.com/users/fnordfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnordfish/subscriptions","organizations_url":"https://api.github.com/users/fnordfish/orgs","repos_url":"https://api.github.com/users/fnordfish/repos","events_url":"https://api.github.com/users/fnordfish/events{/privacy}","received_events_url":"https://api.github.com/users/fnordfish/received_events","type":"User","site_admin":false},"created_at":"2017-01-12T17:01:48Z","updated_at":"2017-01-12T17:01:48Z","body":"Plugin-gist is here: https://gist.github.com/fnordfish/25098891d6337a083a4c0e23a7adfd5e"}}
{"actor":{"display_login":"fnordfish"}}