D
D
Dymok2019-09-04 14:15:48
Layout
Dymok, 2019-09-04 14:15:48

How to use tags in Pug mixin pass parameters?

For example, there is a mixin

+mixin test(text)
  p #{text}

If you pass as the text parameter "test <br> test", this one <br>will be displayed as text, and not as a line break. How to fix it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrej Sharapov, 2019-09-04
@UnluckySerivelha

It seems so

- var a = "Hello, <br> World!"

p!= a

0
0xD34F, 2019-09-04
@0xD34F

https://pugjs.org/language/interpolation.html#stri...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question