玉:元素属性值不 [英] Jade: element attributes without value

查看:149
本文介绍了玉:元素属性值不的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来使用玉 - 和它的真棒迄今

I am new to using Jade -- and it's awesome so far.

但有一件事,我需要发生的是一个元素与'的itemscope属性:

But one thing that I need to happen is an element with 'itemscope' property:

<header itemscope itemtype="http://schema.org/WPHeader">

我的玉符号是:

header(itemscope, itemtype='http://schema.org/WPHeader')

但结果是:

<header itemscope="itemscope" itemtype="http://schema.org/WPHeader">

我怎样才能确保我得到正确的结果 - 的itemscope 而不是的itemscope =的itemscope

推荐答案

我只是想在一个防爆press.js /翡翠项目,结果我得到的是:

I just tried it in a Express.js/Jade project and the result i get is:

<header itemscope itemtype="http://schema.org/WPHeader"></header>

我也试了一下在bash,然后我得到了相同的结果你。

I also tried it in bash and then I get the same result as you.

我用下面的建议去还是在Github上创建一个问题。

I'd go with the following suggestion or create an issue on Github.

的itemscope =的itemscope的工作只是以及刚刚的itemscope。看起来这是翡翠的默认行为。我只是去用它。

itemscope="itemscope" will work just as well as just itemscope. It looks like that's the default behavior of Jade. I'd just go with it.

这篇关于玉:元素属性值不的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆