Nesting a text inside a tag in slim

Marek Příhoda picture Marek Příhoda · Nov 22, 2012 · Viewed 10.4k times · Source

How do I nest the 'Featured' text inside the a tag, given the span, the text, and the other span are siblings?

li
  a href="#" class="selected"
    span class="icon-before"
    Featured
    span class="icon-after"

Answer

jdoe picture jdoe · Nov 22, 2012
li
  a href="#" class="selected"
    span class="icon-before"
    | Featured
    span class="icon-after"

Gives:

<li><a class="selected" href="#"><span class="icon-before"></span>Featured<span class="icon-after"></span></a></li>