TemplateSyntaxError: expected token 'name', got ')' #100

Closed
vpelletier opened this Issue Mar 8, 2012 · 0 comments

Comments

Projects
None yet
1 participant

I get this error when writign a macro with a trailing comma:

{% macro foo (
bar,
)%}
...
{% endmacro %}

Although it's not strictly required to make the macro work (I can just drop the trailing comma), it's quite convenient VCS-wise: if I add another parameter, I don't get a diff on the last existing parameter just because I need to add a comma.

@njl njl added a commit to njl/jinja2 that referenced this issue Mar 13, 2012

@njl njl Fix Issue #100, tailing commas in macros args
This change will allow trailing commas in macro definitions, and in
calls to macros.
7b2f718

mitsuhiko closed this in 15e9eef May 19, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment