javascript - Converting a newline from JS to HTML with Node.js -
supposing have object data
defined follows:
res.render('index', { data: 'line one\nline two' });
how can render value in html (by using jade template engine) splitting text on 2 lines?
note: using \<br\>
instead of \n
, still doesn't work.
try
res.render('index', { data: 'line 1 <br/> line two' })
and in index.jade
!= data
Comments
Post a Comment