Closed mostrecent closed 5 years ago
@mostrecent for now that is the only way to insert pug inside javascript (attributes are just javascript). I'm not even sure if we can do anything cool for this, I'm open to suggestions.
@mostrecent I suggest to continue this discussion in the #88. Since your question is resolved (as far as we can resolve it), I'd like to extend it and reach a decision for the more generic problem.
Feel free to re-open the issue if you disagree or if you have other point of view ;).
PS. Thanks for all your issues and warm words.
Pug and this repo are just great. It's nice to see that this plugin is actively maintained and just got a version bump.
I am wondering if there is any better way to embed
pug
intopug
template strings, e.g. if I use render props. Here is an example:This was the most elegant I could achieve. I am wondering if this second embedded
pug
in the render function of Route can be expressed without apug
? I understood that the attributes are plain JS, so I guess not, right?Motivation for this question: Great about pug is that you don't need to care about closing tags and their indentation but with inline functions you need again something at the end of the inline function.