欢迎访问 如意编程网!

如意编程网

当前位置: 首页 > 编程资源 > 综合教程 >内容正文

综合教程

VIM下Express jade空格问题:expected "indent", but got "newline"

发布时间:2023/10/11 综合教程 29 老码农
如意编程网 收集整理的这篇文章主要介绍了 VIM下Express jade空格问题:expected "indent", but got "newline" 小编觉得挺不错的,现在分享给大家,帮大家做个参考.
Error: /home/y/my_note/nodejs/myapp/views/index.jade:
| -list=[{name:'zhangsan',age:,email:'zhangsan@123.com'}]
| -each l in list
> | tr
| td=l.name
| td=l.age
| td=l.email expected "indent", but got "newline"
at Parser.expect (/home/y/my_note/nodejs/myapp/node_modules/jade/lib/parser.js::)
at Parser.block (/home/y/my_note/nodejs/myapp/node_modules/jade/lib/parser.js::)
at Parser.parseEach (/home/y/my_note/nodejs/myapp/node_modules/jade/lib/parser.js::)
at Parser.parseExpr (/home/y/my_note/nodejs/myapp/node_modules/jade/lib/parser.js::)
at Parser.block (/home/y/my_note/nodejs/myapp/node_modules/jade/lib/parser.js::)
at Parser.tag (/home/y/my_note/nodejs/myapp/node_modules/jade/lib/parser.js::)
at Parser.parseTag (/home/y/my_note/nodejs/myapp/node_modules/jade/lib/parser.js::)
at Parser.parseExpr (/home/y/my_note/nodejs/myapp/node_modules/jade/lib/parser.js::)
at Parser.block (/home/y/my_note/nodejs/myapp/node_modules/jade/lib/parser.js::)
at Parser.tag (/home/y/my_note/nodejs/myapp/node_modules/jade/lib/parser.js::)

在20行需要一个缩进,修改为以下就可以了:

 17       tbody
18 -list=[{name:'zhangsan',age:25,email:'zhangsan@123.com'}]
19 -each l in list
20 tr
21 td= l.name
22 td= l.age
23 td= l.email

总结

以上是如意编程网为你收集整理的VIM下Express jade空格问题:expected "indent", but got "newline"的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得如意编程网网站内容还不错,欢迎将如意编程网推荐给好友。