Answer the question
In order to leave comments, you need to log in
How to make multiline non-compiled text in tag attributes in pug (jade)?
There is such a code in jade (pug):
body(
|{% case page.url %}
| {% when '/' %}
| class="hellopage"
| {% when page.url contains '/gallery/' %}
| class="gallerypage"
|{% endcase %}
)
Answer the question
In order to leave comments, you need to log in
copy-paste from offsite
If your inline tags don't require many attributes, you may find it easiest to use tag interpolation, or literal HTML, within a plain text block.
p.
Using regular tags can help keep your lines short,
but interpolated tags may be easier to #[em visualize]
whether the tags and text are whitespace-separated.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question