akdubya / dustjs

Asynchronous templates for the browser and node.js
http://akdubya.github.com/dustjs/
MIT License
1.44k stars 131 forks source link

exists/notexists sections don't work for inline partial blocks #33

Open laurie71 opened 13 years ago

laurie71 commented 13 years ago

Sometime a block should be wrapped by other markup, but that markup should only be included when the block is defined:

**base.dust***

{?block}
<div class="my-block">
    {+block/}
</div>
{/block}

template.dust

{>"base.dust"/}
{<block}wrap this with a classed div{/block}

The {?block} check never succeeds, so neither the block nor the wrapper markup get output to the result stream.