Notice the readability and balance of:
<li class='aclass anotherclass <%= maybeaconditionalclass %>'>
<a href="<%= some stuff %>">
<%= some other stuff %>
</a>
</li>
which unfortunately produces trailing whitespace inside the link resulting in a ugly trailing underline. Now although less readable I can live with this:
<li class='apossibleclass anotherclass <%= maybeaconditionalclass %>'>
<a href="<%= some stuff %>"><%= some other stuff %></a>
</li>
Still, the same problem remains if I now consider this kind of thing:
li.apossibleclass:after {
content: "/";
}
as the whitespace between the closing A and LI gets in the way of what should be sticking to my list item's end. I could only produce that ugly mess as a workaround:
<li class='apossibleclass anotherclass <%= maybeaconditionalclass %>'>
<a href="<%= some stuff %>"><%= some other stuff %></a></li>
Django came up with a nice solution: {% spaceless %}, so I'm looking for the equivalent of the {% spaceless %} tag in Rails erb templates.