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

Document with context behavior for import directive #1209

Merged
merged 2 commits into from
Jul 19, 2020

Conversation

bengmur
Copy link
Contributor

@bengmur bengmur commented Apr 18, 2019

Summary

Proposed change:

  • Document with context behavior on an import directive.

For example:

in a.nunj:

{% set processed_var = from_context %}

in b.nunj:

{% set from_context = "hello" %}
{% from "./a.nunj" import processed_var with context %}
{{ processed_var }} {# will output "hello" #}

in c.nunj:

{% set from_context = "hello" %}
{% from "./a.nunj" import processed_var %}
{{ processed_var }} {# will not output anything #}

Closes #522.

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.

@bengmur
Copy link
Contributor Author

bengmur commented Apr 18, 2019

Appears to relate to #522, #539.

@fofr
Copy link

fofr commented Jan 8, 2020

I just found this documentation useful, any reason it's not been merged?

@fdintino fdintino self-assigned this Jul 14, 2020
@fdintino fdintino force-pushed the document-with-context branch from 9417c1e to 73a4eb3 Compare July 19, 2020 18:33
@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2020

Codecov Report

Merging #1209 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1209   +/-   ##
=======================================
  Coverage   89.60%   89.60%           
=======================================
  Files          22       22           
  Lines        3041     3041           
=======================================
  Hits         2725     2725           
  Misses        316      316           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbcbaf3...73a4eb3. Read the comment docs.

@fdintino fdintino merged commit 73a4eb3 into mozilla:master Jul 19, 2020
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.

Please add documentation for "import with context"
5 participants