Node.js uses Express framework jade template, how to let html keep spaces and line breaks

  node.js, question

Just learned to use node.js and Express, and made a test page with jade template, showing no problem. However, looking at the source file, we found that in html, all spaces and line breaks were automatically removed and everything became one line. Can you tell me how to make html keep normal line wrapping? (At first, it was suspected that Express did compression, and there was no problem with using ejs template instead.)

Try this:

app.set('view options', { pretty: true });