I’m trying to generate a comment on a single line at the end of an HTML file:
<!-- generated by SERVER1 -->
I have tried
/
generated by #{@server_name}
But this outputs it over 3 lines –
<!--
generated by SERVER1
-->
I’ve tried
/ generated by #{@server_name}
But that doesn’t evaluate the @server_name var –
<!-- generated by #{@server_name} -->
Any ideas?
Just as you can drop back to raw HTML output when you want, so you can drop in raw HTML comments, even with interpolation.
This template:
Produces this output:
Tested with Haml v3.1.4 (Separated Sally)