Skip to content

Conversation

@grob
Copy link
Contributor

@grob grob commented May 6, 2021

  • new features:
    • allow relative paths in include and extend tags
    • cache included templates in render context to avoid re-parsing of template in loops
    • prevent circular and self-extends
  • "modernized" code

Robert Gaggl added 30 commits April 20, 2021 15:08
…in, so use a custom cycle iterator instead
the environment is required for template compilation in caching loader
this required passing the origin to the non-debug parser too (i dunno
why this wasn't done before).
the loader directories stored in origin until this change weren't used anywhere,
and are still accessible in origin.loader.templateDirs - but the absolute file
path wasn't stored anywhere, but will be necessary for an upcoming change:
skipping the template containing an extends tag from extending itself.
this avoids re-parsing included templates in for loops
added a history array to context that contains the absolute paths
of all _extending_ templates. loaders need to check against
this array and exclude already used templates.
Robert Gaggl and others added 4 commits May 10, 2021 08:37
using a regex instead of a string as first argument to replace, since
using a string would only replace the first occurrence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants