chrisdickinson/plate — pull request #22 by eternicode (2014-04-19 03:25:19+00:00)
Title: Don't exit filter resolution early if the variable isn't in the context

Variables missing from the context shouldn't result in an early-exit rendering of `''`, since filters may be used to "recover" a value.

A couple examples:

* `{{ a|yesno:"yes,no" }}`; In Django, rendering this with `a` missing from the context would result in `"no"`
* `{{ a|default:"foo" }}`; Likewise, this would result in `"foo"` if the variable was missing

---

I apologize for the somewhat busy diff -- the first patch removes trailing whitespace, because maintaining the trailing whitespace is a pain with the way my editor is set up (it strips trailing whitespace on save), and trailing whitespace is a bad thing anyway. I'll remove that commit somehow if necessary.