Skip to content

Commit 236d1b8

Browse files
committed
Nitpick fixes
1 parent 0eb7b0c commit 236d1b8

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/main/java/com/hubspot/jinjava/lib/tag/MacroTag.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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(
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{% macro macro1(options={}) %}
2-
<!-- code here, renders HTML ->
2+
<!-- code here, renders HTML -->
33
{% endmacro %}
44
{% macro macro2(options={}) %}
5-
<!-- some code, mainly formats passed options -->
5+
<!-- some code, mainly formats passed options -->
66

7-
{% call macro1() %}{% endcall %}
7+
{% call macro1() %}{% endcall %}
88
{% endmacro %}

0 commit comments

Comments
 (0)