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

Nunjucks regression with shortcodes in loops #2140

Closed
zachleat opened this issue Dec 19, 2021 · 3 comments
Closed

Nunjucks regression with shortcodes in loops #2140

zachleat opened this issue Dec 19, 2021 · 3 comments

Comments

@zachleat
Copy link
Member

zachleat commented Dec 19, 2021

Present in Eleventy 1.0.0-canary.46 and 47 (not in any Beta releases)

This will render but the data bound and available for use in the shortcode will be wrong.

{% for … %}
   {% customshortcode %}
{% endfor %}

Caused by the async-everything stuff we shipped in #1749 and #1053

@zachleat zachleat added the bug label Dec 19, 2021
@zachleat zachleat added this to the Eleventy 1.0.0 milestone Dec 19, 2021
@zachleat zachleat self-assigned this Dec 19, 2021
@zachleat
Copy link
Member Author

Fixed by 17a1867

@zachleat
Copy link
Member Author

Cross reference #498 while we’re in here

@zachleat
Copy link
Member Author

zachleat commented Oct 26, 2022

Note for future folks that if your shortcode is async in Nunjucks you will need asyncEach or asyncAll instead of for:
https://mozilla.github.io/nunjucks/templating.html#asyncall

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

No branches or pull requests

1 participant