Pug, Marked and NodeJs issue

118 Views Asked by At

I have a question regarding Node, Pug and Marked. I have one, specific place where I'll be adding reports and I'd like them to have simple formatting (bold, links etc).

It seems that everything is working fine but when it imports data from database which I import like that:

#{marked(meeting.report)}

But it seems that PUG adds < > before and after imported data which gives such output:

< Meeting report >

Could someone tell me if there is any solution for that?

1

There are 1 best solutions below

0
On

In order to allow markedJS formatting, I used PUG's unescaped rendered code:

p!= marked(meeting.report)