meteor-jade icon indicating copy to clipboard operation
meteor-jade copied to clipboard

Raw Output and Argument Passing

Open WilliamHuey opened this issue 8 years ago • 1 comments

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"

WilliamHuey avatar Jul 17 '15 07:07 WilliamHuey

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 }

dalgard avatar Oct 14 '15 10:10 dalgard