diff options
author | Robert Speicher <robert@gitlab.com> | 2017-04-13 17:25:33 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-04-13 17:25:33 +0000 |
commit | 7d7dfee48b3455eec07968e7517f9d843a04da66 (patch) | |
tree | 1dc11dd0bc27a412429b9de3288997e9a700c30f /lib | |
parent | 7761afe0910fffc576244a7e0d9e43ada7a6045d (diff) | |
parent | 551d0a3c03ebb74b0893252683361c280e86849e (diff) | |
download | gitlab-ce-7d7dfee48b3455eec07968e7517f9d843a04da66.tar.gz |
Merge branch 'fix-appending-state-to-issuable-references' into 'master'
Fix appending state to issuable references
Closes #30874
See merge request !10683
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 |