diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2017-04-19 17:15:36 +0200 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2017-04-19 18:36:12 +0200 |
commit | 1269ee4c3bd3a7875fdcd15554b904fab94fba50 (patch) | |
tree | 35e47d697dce43be30ce21b1c74cda78b15192cc /lib/banzai | |
parent | 29ddc15f8d9b094bb7052875f7728ee48f7ad06b (diff) | |
download | gitlab-ce-1269ee4c3bd3a7875fdcd15554b904fab94fba50.tar.gz |
Do not append issuable state to links with custom anchorissuable-state-custom-links
Closes #30916
Change the presentation from [closed] to (closed)
Diffstat (limited to 'lib/banzai')
-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 1a9d03beb51..327ea9449a1 100644 --- a/lib/banzai/filter/issuable_state_filter.rb +++ b/lib/banzai/filter/issuable_state_filter.rb @@ -15,8 +15,8 @@ module Banzai issuables = extractor.extract([doc]) issuables.each do |node, issuable| - if VISIBLE_STATES.include?(issuable.state) && node.children.present? - node.add_child(Nokogiri::XML::Text.new(" [#{issuable.state}]", doc)) + if VISIBLE_STATES.include?(issuable.state) && node.inner_html == issuable.reference_link_text(project) + node.content += " (#{issuable.state})" end end |