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

Fix for Loop properties revindex and revindex0 still wrong in Jinja2 2.10 #794 #993

Merged
merged 1 commit into from
Oct 14, 2019

Conversation

aayushuppal
Copy link
Contributor

@aayushuppal aayushuppal commented May 6, 2019

  • The approach to set length param is costly and should be avoided. only if someone expects the iterator length should the cost be borne.
  • Added test cases to validate rendering and LoopContext behavior

fixes #459
fixes #751
fixes #794

@aayushuppal
Copy link
Contributor Author

Issue & Fix summary

  • The LoopContext length property implementation was incorrect & suboptimal which in turn messed up the values of revindex revindex0
  • Fixed LoopContext length property implementation
  • Added testcases

@davidism davidism changed the base branch from 2.10.x to master October 14, 2019 16:11
@davidism davidism changed the base branch from master to 2.10.x October 14, 2019 16:12
@davidism davidism changed the base branch from 2.10.x to master October 14, 2019 16:12
@davidism davidism merged commit 81b3224 into pallets:master Oct 14, 2019
@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
3 participants