R
R
R4tm4n2018-10-18 17:42:39
Pug
R4tm4n, 2018-10-18 17:42:39

How to insert html tag in pug loop?

I output li-shki in ul in a loop in pug, respectively, the variable contains texts for these li-shki, there should be line breaks (br-ki) in the text, but in the cycle for some reason it does not want to display tags, through interpolation, in the documentation I found only the output of a specific variable with tags in this way -! {variable}, and if we just display the variable, then everything is OK, namely in the loop if you write li! {item.text} then the tags are displayed as plain text

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2018-10-18
@werty1001

li!= val
or
https://codepen.io/werty1001/pen/ZqxwyP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question