Recently in Rails 6.1 was introduced option to annotate rendering of templates with some debug comments.
Internally such behavior is handled by actionview/lib/action_view/template/handlers/erb/erubi.rb:
if ActionView::Base.annotate_template_file_names
properties[:preamble] = "@output_buffer.safe_append='<!-- BEGIN #{properties[:short_identifier]} -->\n';"
properties[:postamble] = "@output_buffer.safe_append='<!-- END #{properties[:short_identifier]} -->\n';@output_buffer.to_s"
else
properties[:preamble] = ""
properties[:postamble] = "@output_buffer.to_s"
end
Recently in Rails 6.1 was introduced option to annotate rendering of templates with some debug comments. Internally such behavior is handled by
actionview/lib/action_view/template/handlers/erb/erubi.rb
:https://github.com/rails/rails/pull/38848 That's very useful developer-time-saving feature, especially on projects with complex layouts.
Is there any way to enable behavior like this in
hamlit
? (register callback, additional prefix handler, etc)