noahmorrison / chevron

A Python implementation of mustache
MIT License
486 stars 52 forks source link

Template doesn't complete rendering, if key doesn't exist in partial #48

Closed cocoroutine closed 5 years ago

cocoroutine commented 5 years ago

Hi,

I believe there is an issue when a key does not exist in the data within a partial. After rendering the partial with a missing key, it should complete rendering of the template. However this is not the case as of 0.13.1. It doesn't return to rendering the rest of the template.

template:

<xml>
                <partial>
                {{>partial_none}}
                </partial>
</xml>

data = {"text": "hello"}

partial_none:

{{#no_key}} key doesn't exist {{/no_key}}

expected output:

<xml>
                <partial>
                </partial>
</xml>

actual output:

<xml>
                <partial>