Reputation: 15197
Using .erb
, you can do this:
<%= some_func -%>
I was wondering if there's a similar technique using .haml
.
= some_func
Upvotes: 2
Views: 329
Reputation: 6145
One solution is to explicitly remove the additional newline character using chomp
:
= some_func.chomp
Another feature which may accomplish the task is the space removal syntax:
%div<
= "test "
It returns the following html:
<div>test</div>
Upvotes: 4