linkedin/dustjs — pull request #13 by jimmyhchan (2012-04-25 00:22:30+00:00)
Title: Issue #8 Support cleaner way to pass arguments to partials

Please see the pull request. Adding parameters was pretty straightforward but it's odd what context to give it.

Currently only sections create new contexts. When you add parameters in sections, Dust puts the parameters context on top, followed by the new context. That way, the current context inside a section becomes the new context and the parameters context become the first head of the tail.

I'm mimicking this behavior in the partials parameters. To keep it so that partials do not create a new context (that is, current context should not change but parameters need to be available) I push the parameter context between the current head and the first head of the tail.