How can I get Express to output nicely formatted HTML?

前端 未结 9 655
名媛妹妹
名媛妹妹 2020-11-28 01:13

When using Express for Node.js, I noticed that it outputs the HTML code without any newline characters or tabs. Though it may be more efficient to download, it\'s not very r

9条回答
  •  攒了一身酷
    2020-11-28 01:53

    Do you really need nicely formatted html? Even if you try to output something that looks nice in one editor, it can look weird in another. Granted, I don't know what you need the html for, but I'd try using the chrome development tools or firebug for Firefox. Those tools give you a good view of the DOM instead of the html.

    If you really-really need nicely formatted html then try using EJS instead of jade. That would mean you'd have to format the html yourself though.

提交回复
热议问题