有没有办法打开换行符?它在调试时很有用. 我知道这个话题(Node.js JADE linebreaks in source?)由于性能而说没有,但是在开发时你的本地机器上应该不是问题. 经过一番搜索,我找到了解决方案
          我知道这个话题(Node.js JADE linebreaks in source?)由于性能而说没有,但是在开发时你的本地机器上应该不是问题.
经过一番搜索,我找到了解决方案.将此添加到您的Express配置中,它将使Jade整理输出:Express 3.x CoffeeScript
app.configure "development", -> app.use express.errorHandler() app.locals.pretty = true
Express 3.x Javascript
app.configure('development', function(){
  app.use(express.errorHandler());
  app.locals.pretty = true;
}); 
 Express 2.x CoffeeScript
app.configure "development", ->
  app.use express.errorHandler()
  app.set "view options",
    pretty: true 
 Express 2.x Javascript
app.configure('development', function(){
  app.use(express.errorHandler());
  app.set('view options', { pretty: true });
});
        
             