Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vpelletier opened this issue Mar 8, 2012 · 0 comments · May be fixed by #1712
Closed

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

vpelletier opened this issue Mar 8, 2012 · 0 comments · May be fixed by #1712

Comments

@vpelletier
Copy link

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 added a commit to njl/jinja2 that referenced this issue Mar 13, 2012
This change will allow trailing commas in macro definitions, and in
calls to macros.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant