Jade: element attributes without value

attributes, pug

Solution

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

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

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

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

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.

Problem

I am new to using Jade -- and it's awesome so far. But one thing that I need to happen is an element with 'itemscope' property: ``` <header itemscope itemtype="http://schema.org/WPHeader"> ``` My Jade notation is: ``` header(itemscope, itemtype='http://schema.org/WPHeader') ``` But result is: ``` <header itemscope="itemscope" itemtype="http://schema.org/WPHeader"> ``` How can I make sure that I get the right result -- `itemscope` instead of `itemscope="itemscope"`?

Original source