1
由于某些原因,这个Jade模板在变量输出周围添加了撇号,无论我尝试什么。您可以看到它是如何保存在底部的文档中的。有任何想法吗?Jade在输出中添加撇号
div.col-md-4.col-xs-12
div#currentImg
img(src=user.profileImg,class="currentImg")
输出为:
<img src="'/uploads/e3670578cc1f0a235ae9686622f37d2c.jpg'" class="currentImg">
对于文档:
{
"_id": {
"$oid": "5547e78c28d405cc236d4a02"
},
"updated_at": {
"$date": "2015-05-07T20:20:16.537Z"
},
"created_at": "Mon May 04 2015 17:41:32 GMT-0400 (EDT)",
"admin": false,
"lastName": "#####",
"firstName": "#####",
"email": "#####",
"password": "#####",
"callsign": "#####",
"uid": "#####",
"logPublic": true,
"profilePublic": true,
"__v": 0,
"profileImg": "/uploads/cf431a1d4cb451d9fb806a987845e8c3.png"
}
是否做到这一点在其他情况下? – tadman
@tadman我在页面上输出了其他变量,这些变量都没有围绕它们的撇号。它们都以相同的方式输出。 – MikeF
您使用的是什么版本的Jade?我无法在最新版本中重现此行为。 http://codepen.io/Chevex/pen/GJoKQr?editors=100 – Chev