Closed dadajuice closed 7 years ago
Sorry but =!{data}
is not valid nor in PugJS, neither in PugPHP, the following is valid on both:
mixin test(data)
!=data
.quote
p Joel: !{"<em>Some of the girls are wearing my mother's clothing.</em>"}
+test("<em>Some of the girls are wearing my mother's clothing.</em>")
Or:
mixin test(data)
| !{data}
.quote
p Joel: !{"<em>Some of the girls are wearing my mother's clothing.</em>"}
+test("<em>Some of the girls are wearing my mother's clothing.</em>")
But you cannot mix =
that should be followed by a expression, and !{}
that is available in raw texts (after |
, after .
and a new indented line or after a tag and a space)
Thanks a lot for the prompt response! It works perfectly!
Hi,
I think I've encountered a bug using unescaped interpolation within a mixin. Here's the code I used (based on the example provided on PugJs website).
If I only use the unescaped interpolation normally it worked as expected, but if I use it within my test mixin it triggers an error :
I'm constructing the Pug instance with the following code :
Thanks a lot!