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

support inline '< >' symbols

Open avalanche1 opened this issue 9 years ago • 4 comments

Hi! Could you make this work please?

avalanche1 avatar Mar 10 '16 16:03 avalanche1

The bind expression inside the string isn't handled by the jade package, it's simply passed to the b bind helper – sorry.

I would generally recommend keeping logic out of the templates and using the viewmodel instead.

dalgard avatar Mar 11 '16 07:03 dalgard

Yeah, I agree. Just thought that if html supports this, then jade should as well.

avalanche1 avatar Mar 11 '16 08:03 avalanche1

Oh. I see that I was too quick to judge – the problem is with the compiler, of course.

Does it work if you use the != syntax described here?

dalgard avatar Mar 11 '16 08:03 dalgard

It doesn't. With the code being:

template(name='listUserGamesBox')
  +box
    p($b!="if:2 > 3") ok1
    p($b!="if:2 < 3") ok2
    p($b!="if:3 > 2") ok3
    p($b!="if:3 < 2") ok4

The error message is still:

While building package brajt:rpg-games:
   user/listUserGames.jade: Jade syntax error: Expected tag name after `<`
   {{{b "if:2 < 3"}}}

brajt avatar Mar 14 '16 21:03 brajt