Add a whitespace at the end of the line in Jade Add a whitespace at the end of the line in Jade express express

Add a whitespace at the end of the line in Jade


If you don't want inline HTML or HTML entities in your code this is what you can do:

p    | Avatar hosted by    =  ' '    a(href='http://www.gravatar.com/', target='_blank') Gravatar

or this is is shorter

p= 'Avatar hosted by '    a(href='http://www.gravatar.com/', target='_blank') Gravatar

The cleanest is probably this

p Avatar hosted by #{''}    a(href='http://www.gravatar.com/', target='_blank') Gravatar


Which version of jade are you using? I just tested (with 0.25.0) with a single space following 'by', and it worked correctly.

Other options are:

p    | Avatar hosted by     a(href='http://www.gravatar.com/', target='_blank') Gravatar

or

p    | Avatar hosted by    |  <a href='http://www.gravatar.com/' target='_blank'>Gravatar</a>


Jade now supports interpolation of inline tags.

p this is #[strong test] of how jade will treat #[i #[u inline tags]]... like #[a(href="/") anchor tags] and #[+a() mixins].

http://jade-lang.com/reference/interpolation/