tags:

views:

68

answers:

1

I often want some html like this:

(<span id="items_shown">all</span> items shown)

which I end up getting by using haml like this:

%span><
  (
%span#items_shown><
  all
%span
  items shown)

Note that I end up having to create extra spans, and then having to control for the whitespace around those spans, in order to get the exact syntax that I want, without extra spaces between the first ( and the all.

So here's the question. What's the best way of having the exact html above, to display (all items shown) with all in a span? Is there something more elegant than my haml?

+1  A: 

Check out the FAQ to this effect. The short answer is that Haml's not optimized for inline markup, and there's no shame in just using HTML if you need to.

nex3