Skip to content

Commit

Permalink
Fix emission of empty ACTIONS tag
Browse files Browse the repository at this point in the history
The latest version of the patterndb schema fail validation if an ACTIONS
tag has no ACTION tag in it.  Ensure we do not produce such a tag when
it is not needed.

Fixes #3
  • Loading branch information
smortex committed Aug 9, 2023
1 parent 038ea1d commit b023c03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/rule-footer.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
<% if ! @actions.empty? -%>
</actions>
<% end -%>
</rule>
2 changes: 2 additions & 0 deletions templates/rule-header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@
<% end -%>
</examples>
<% end -%>
<% if ! @actions.empty? -%>
<actions>
<% end -%>

0 comments on commit b023c03

Please sign in to comment.