Skip to content

Commit

Permalink
Merge pull request #1097 from scireum/feature/aha/filter-empty-tag
Browse files Browse the repository at this point in the history
Prevents empty <t:tag> tags from being rendered.
  • Loading branch information
andyHa authored Sep 13, 2022
2 parents 1cac569 + 8077384 commit 4969244
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/main/resources/default/taglib/t/tag.html.pasta
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<i:arg type="String" name="color" default="gray" description="Specifies the color to use." />
<i:arg type="boolean" name="marginRight" default="true" description="Determines if the dot has an auto margin at the right"/>
<i:arg type="String" name="class" default=""
description="Defines addition classes to add."/>
<i:arg type="String" name="color" default="gray" description="Specifies the color to use."/>
<i:arg type="boolean"
name="marginRight"
default="true"
description="Determines if the dot has an auto margin at the right"/>
<i:arg type="String" name="class" default="" description="Defines addition classes to add."/>
<i:arg type="String" name="value" default="@renderToString('body')"/>

<i:pragma name="description">
Renders a colored tag using the given text.
</i:pragma>

<span class="border-sirius-@color tycho-tag @if(marginRight){ mr-2 } mb-2 d-inline-block @class">
<i:render name="body" />
</span>
<i:if test="isFilled(value)">
<span class="border-sirius-@color tycho-tag @if(marginRight){ mr-2 } mb-2 d-inline-block @class">
<i:raw>@value</i:raw>
</span>
</i:if>

0 comments on commit 4969244

Please sign in to comment.