Jade template how to add text after tag on the same level

charleetm picture charleetm · Nov 8, 2012 · Viewed 7.7k times · Source

I am try to get this to work in jade template:

html:

<li><i class="icon-comment"></i> 5</li>

jade:

li:i.icon-comment 5

ofcource 5 now is nested under i tag rather then li. Any way to do this?

Answer

David Weldon picture David Weldon · Nov 8, 2012

In my templates I do it like this:

li
  i.icon-comment
  |  5