Search code examples
node.jspug

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


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?


Solution

  • In my templates I do it like this:

    li
      i.icon-comment
      |  5