meteor-jade
meteor-jade copied to clipboard
Raw Output and Argument Passing
I am getting a Jade warning when trying to output raw content to a template when passing in a value to a helper function (obfuscatedEmail is the helper function).
template(name='email')
if icon
{{{obfuscatedEmail icon }}}
else
!{ obfuscatedEmail }
The warning complains about a missing space, but I am not quite sure what that means.
Warning: missing space before text for line 3 of jade file "client/templates/index/email.jade"
You need to put a pipe |
before the interpolation. Interpolation syntax should be seen as part of text in Jade.
template(name='email')
if icon
| {{{obfuscatedEmail icon }}}
else
| !{ obfuscatedEmail }