Skip to content

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

Merged
davidism merged 1 commit intopallets:masterfrom
aayushuppal:loop_fix
Oct 14, 2019
Merged

Fix for Loop properties revindex and revindex0 still wrong in Jinja2 2.10 #794#993
davidism merged 1 commit intopallets:masterfrom
aayushuppal:loop_fix

Conversation

@aayushuppal
Copy link
Copy Markdown
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
Copy Markdown
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