mozilla / nunjucks

A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)
https://mozilla.github.io/nunjucks/
BSD 2-Clause "Simplified" License
8.48k stars 634 forks source link

Export Context #1424

Open zt8989 opened 1 year ago

zt8989 commented 1 year ago

Summary

Proposed change:

Export Context so that we can write a plugin to render block like jinja2-fragments

Checklist

I've completed the checklist below to ensure I didn't forget anything. This makes reviewing this PR as easy as possible for the maintainers. And it gets this change released as soon as possible.

codecov[bot] commented 1 year ago

Codecov Report

Base: 89.65% // Head: 89.65% // No change to project coverage :thumbsup:

Coverage data is based on head (0f22a52) compared to base (fd50090). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1424 +/- ## ======================================= Coverage 89.65% 89.65% ======================================= Files 22 22 Lines 3046 3046 ======================================= Hits 2731 2731 Misses 315 315 ``` | [Impacted Files](https://codecov.io/gh/mozilla/nunjucks/pull/1424?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mozilla) | Coverage Δ | | |---|---|---| | [nunjucks/src/environment.js](https://codecov.io/gh/mozilla/nunjucks/pull/1424/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mozilla#diff-bnVuanVja3Mvc3JjL2Vudmlyb25tZW50Lmpz) | `85.82% <ø> (ø)` | | | [nunjucks/index.js](https://codecov.io/gh/mozilla/nunjucks/pull/1424/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mozilla#diff-bnVuanVja3MvaW5kZXguanM=) | `64.70% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mozilla). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mozilla)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.