-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bugs in how macro functions reconstruct the current path
- Loading branch information
1 parent
789cfe2
commit 74d9a4d
Showing
12 changed files
with
85 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/test/resources/eager/wraps-current-path-around-macro/dir1/macro.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{% macro foo_importer() -%} | ||
{%- import "../../../eager/wraps-current-path-around-macro/dir2/imported.jinja" -%} | ||
{%- print foo -%} | ||
{%- endmacro %} |
1 change: 1 addition & 0 deletions
1
src/test/resources/eager/wraps-current-path-around-macro/dir2/imported.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% set foo = deferred %} |
11 changes: 11 additions & 0 deletions
11
src/test/resources/eager/wraps-current-path-around-macro/test.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% set __macro_foo_importer_1564912668_temp_variable_0__ %}\ | ||
{% set current_path = '../../eager/wraps-current-path-around-macro/dir1/macro.jinja' %}\ | ||
{% do %}\ | ||
{% set current_path = '../../eager/wraps-current-path-around-macro/dir2/imported.jinja' %}\ | ||
{% set foo = deferred %}\ | ||
{% set current_path = '../../eager/wraps-current-path-around-macro/dir1/macro.jinja' %}\ | ||
{% enddo %}\ | ||
{% print foo %}\ | ||
{% set current_path = '' %}\ | ||
{% endset %}\ | ||
{% print __macro_foo_importer_1564912668_temp_variable_0__ %} |
2 changes: 2 additions & 0 deletions
2
src/test/resources/eager/wraps-current-path-around-macro/test.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% from "../../eager/wraps-current-path-around-macro/dir1/macro.jinja" import foo_importer -%} | ||
{% print foo_importer() %} |