Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Raw Output and Argument Passing #157

Open
WilliamHuey opened this issue Jul 17, 2015 · 1 comment
Open

Raw Output and Argument Passing #157

WilliamHuey opened this issue Jul 17, 2015 · 1 comment

Comments

@WilliamHuey
Copy link

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"
@dalgard
Copy link

dalgard commented Oct 14, 2015

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 }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants