admin管理员组文章数量:1221309
I want to write my pug array in multiple lines like this:
- var data = [
["1", "1.1"],
"2"
]
but pug doesnt allow it. I have to write it inline like this atm:
- var data = [["1", "1.1"], "2"]
Any idea? Thanks for help.
I want to write my pug array in multiple lines like this:
- var data = [
["1", "1.1"],
"2"
]
but pug doesnt allow it. I have to write it inline like this atm:
- var data = [["1", "1.1"], "2"]
Any idea? Thanks for help.
Share Improve this question asked Jan 17, 2017 at 0:08 phngphng 3523 silver badges13 bronze badges 1- Or how can I realise this? To work with an json object would be much more comfortable? naltatis.github.io/jade-syntax-docs/#variables – phng Commented Jan 17, 2017 at 0:11
1 Answer
Reset to default 22As suggested in https://github.com/pugjs/pug/issues/502#issuecomment-137893041
try this:
-
var data = [
["1", "1.1"],
"2"
]
Note that the -
is on a separate line.
本文标签: javascriptWrite pug array in multiple linesStack Overflow
版权声明:本文标题:javascript - Write pug array in multiple lines - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739256148a2155145.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论