File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
main/java/com/hubspot/jinjava/lib/tag
test/resources/tags/macrotag Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -89,14 +89,13 @@ public boolean isRenderedInValidationMode() {
8989 public String interpret (TagNode tagNode , JinjavaInterpreter interpreter ) {
9090 String name ;
9191 String args ;
92- final String parentName ;
92+ String parentName = "" ;
9393 Matcher childMatcher = CHILD_MACRO_PATTERN .matcher (tagNode .getHelpers ());
9494 if (childMatcher .find ()) {
9595 parentName = childMatcher .group (1 );
9696 name = childMatcher .group (2 );
9797 args = Strings .nullToEmpty (childMatcher .group (3 ));
9898 } else {
99- parentName = "" ;
10099 Matcher matcher = MACRO_PATTERN .matcher (tagNode .getHelpers ());
101100 if (!matcher .find ()) {
102101 throw new TemplateSyntaxException (
Original file line number Diff line number Diff line change 11{% macro macro 1(options ={}) %}
2- <!-- code here, renders HTML ->
2+ <!-- code here, renders HTML - ->
33{% endmacro %}
44{% macro macro 2(options ={}) %}
5- <!-- some code, mainly formats passed options -->
5+ <!-- some code, mainly formats passed options -->
66
7- {% call macro 1() %}{% endcall %}
7+ {% call macro 1() %}{% endcall %}
88{% endmacro %}
You can’t perform that action at this time.
0 commit comments