SyrusAkbary/pyjade — pull request #49 by drdaeman (2012-12-03 02:58:03+00:00)
Title: Mixin block support (`+mixin` calls)

I've wanted to supply block content for mixins, and found that while Jade
allows this (using `+mixin` call notation), pyjade does not. So, here's a patch.

This should also resolve issue #46.

For reference, see original Jade commits visionmedia/jade@ae8e8b7d, visionmedia/jade@cf886ece and visionmedia/jade@8ec78bba.

Tests seem to pass fine, but I'm not sure about Jinja2 implementation, as
it contains a hack/workaround, because the following Jinja2 template failed to pass data. Don't know if that's Jinja's fault or just me misunderstanding something.

{% macro foo() %}

{% call bar %}{{ caller() }}{% endcall %}

{% endmacro %}

I guess, my code should work fine for simple cases but some complex/bizarre nested mixin chains may misbehave.