0

Supposing that I have an object data defined as follows:

res.render('index', {
    data: 'Line one\nLine two' });

How can I properly render its value in html (by using Jade as template engine) splitting the text on two lines?

Note: by using \<br\> instead of \n, it still doesn't work.

vdenotaris
  • 13,297
  • 26
  • 81
  • 132

1 Answers1

0

Try this

res.render('index', {
    data: 'Line one <br/> Line two'
})

and in index.jade

  != data
Jephron
  • 2,652
  • 1
  • 23
  • 34