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
  • 12,588
  • 24
  • 76
  • 129

1 Answers1

0

Try this

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

and in index.jade

  != data
Jephron
  • 2,482
  • 1
  • 20
  • 33