-
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.
Revert "Revert "Wrap the current path around reconstructed macro func…
…tions""
- Loading branch information
1 parent
c3b56b8
commit f21212b
Showing
15 changed files
with
140 additions
and
12 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
2 changes: 1 addition & 1 deletion
2
src/test/resources/eager/puts-deferred-fromed-macro-in-output.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 |
---|---|---|
@@ -1 +1 @@ | ||
{% set myname = deferred + 3 %}{% set __macro_getPath_331491059_temp_variable_1__ %}Hello {{ myname }}{% endset %}{% print __macro_getPath_331491059_temp_variable_1__ %} | ||
{% set myname = deferred + 3 %}{% set __macro_getPath_331491059_temp_variable_1__ %}{% set current_path = 'simple-with-call.jinja' %}Hello {{ myname }}{% set current_path = '' %}{% endset %}{% print __macro_getPath_331491059_temp_variable_1__ %} |
2 changes: 1 addition & 1 deletion
2
src/test/resources/eager/puts-deferred-imported-macro-in-output.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 |
---|---|---|
@@ -1 +1 @@ | ||
{% set myname = deferred + 3 %}{% set __macro_getPath_331491059_temp_variable_1__ %}Hello {{ myname }}{% endset %}{% print __macro_getPath_331491059_temp_variable_1__ %} | ||
{% set myname = deferred + 3 %}{% set __macro_getPath_331491059_temp_variable_1__ %}{% set current_path = 'simple-with-call.jinja' %}Hello {{ myname }}{% set current_path = '' %}{% endset %}{% print __macro_getPath_331491059_temp_variable_1__ %} |
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() %} |
3 changes: 3 additions & 0 deletions
3
src/test/resources/snippets/from-tag-doesnt-steal-extends/base.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,3 @@ | ||
{% block content %} | ||
yo | ||
{% endblock %} |
1 change: 1 addition & 0 deletions
1
src/test/resources/snippets/from-tag-doesnt-steal-extends/something-to-import.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 = 'hi' %} |
1 change: 1 addition & 0 deletions
1
src/test/resources/snippets/from-tag-doesnt-steal-extends/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 @@ | ||
<p>Test</p> |
7 changes: 7 additions & 0 deletions
7
src/test/resources/snippets/from-tag-doesnt-steal-extends/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,7 @@ | ||
{% extends './base.jinja' %} | ||
{% from './something-to-import.jinja' import foo %} | ||
{{ foo }} | ||
Don't show me! | ||
{% block content %} | ||
<p>Test</p> | ||
{% endblock %} |