-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow specifying variables in include (#553)
- Loading branch information
Showing
10 changed files
with
188 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Should be blank: {{ included_variable_should_not_leak }} |
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 @@ | ||
Should be blank: {{ included_variable_should_not_leak_inner }} |
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,36 @@ | ||
# Test included variable | ||
{{ included_variable }} | ||
|
||
# Test included variable with markdown | ||
{{ included_variable_with_markdown }} | ||
|
||
# Test included variable as attribute | ||
<p style="{{ included_variable_as_attribute }}">Test</p> | ||
|
||
# Test included variable as html element | ||
{{ included_variable_as_html_element }} | ||
|
||
# Test included variable overridden by variables.md | ||
{{ global_variable_overriding_included_variable }} | ||
|
||
# Test included variables in included file | ||
<include src="testIncludeVariablesIncludedFile.md"> | ||
<span id="included_variable_inner_overridden">Included variable overridden by outer variable</span> | ||
<span id="included_variable_should_not_leak_inner">Included variable should not leak into other files</span> | ||
</include> | ||
|
||
# Inner included variables should not leak into other files | ||
<include src="testIncludeVariableLeakInner.md" /> | ||
|
||
# Test included variable with global variable | ||
{{ included_variable_with_global_variable }} | ||
|
||
{% set included_variable = "Inner variable overridden by set" %} | ||
{% set included_global_variable = "Global variable overridden by set" %} | ||
|
||
# Test included variable overridden by set | ||
{{ included_variable }} | ||
{{ included_global_variable }} | ||
|
||
# Test missing variable with default | ||
{{ missing_variable or "Missing Variable" }} |
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 @@ | ||
{{ included_variable_in_outer_included_file }} | ||
|
||
{{ included_variable_inner_overridden }} |