diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/issuable_state_filter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/banzai/filter/issuable_state_filter.rb b/lib/banzai/filter/issuable_state_filter.rb index 6b78aa795b4..0b2b8bd7f4d 100644 --- a/lib/banzai/filter/issuable_state_filter.rb +++ b/lib/banzai/filter/issuable_state_filter.rb @@ -13,8 +13,8 @@ module Banzai issuables = extractor.extract([doc]) issuables.each do |node, issuable| - if VISIBLE_STATES.include?(issuable.state) - node.children.last.content += " [#{issuable.state}]" + if VISIBLE_STATES.include?(issuable.state) && node.children.present? + node.add_child(Nokogiri::XML::Text.new(" [#{issuable.state}]", doc)) end end |