Skip to content

Commit

Permalink
Don't render blank lines (#164)
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware authored Oct 21, 2024
1 parent 21acfa1 commit 513f4c2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ public void setAttribute(String attribute, TemplateGroup tg)
StringWriter out = new StringWriter();
STWriter wr = new AutoIndentWriter(out);
template.get_st().write(wr, error_listener_);
m.getValue().get_st().add(attribute, out.toString());
String out_string = out.toString();

if (!out_string.isBlank())
{
m.getValue().get_st().add(attribute, out.toString());
}

// Unset the current TemplateSTGroup in TemplateManager.
manager_.set_current_template_stgroup(null);
Expand Down

0 comments on commit 513f4c2

Please sign in to comment.