I am converting my ERB template to a HAML template.
<p>
Welcome to <span><%= name1 %> </span>, <span> <%= name2 %></span> and <span><%= name3 %></span>.
</p>
This is what I have come up with
%p
Welcome to
%span= name1
,
%span= name2
and
%span= name3
.
I have a feeling that there is much more elegant way to do this.
There's no reason you shouldn't use inline HTML tags in your Haml document. See this post explaining why Haml isn't good for inline markup.
<p>
Welcome to <span>#{name1}</span>, <span>#{name2}</span> and <span>#{name3}</span>.
</p>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With