diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-04-20 09:52:39 +0000 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-04-20 20:13:22 +0800 |
commit | 65a136b4f46f4e647b06d3163b718c726d9b58ad (patch) | |
tree | e24f5485356b409b302232fb0b9e494404f97ba3 /lib/banzai | |
parent | 715d681340490fdeaae9af85f36be54879c09cb1 (diff) | |
download | gitlab-ce-65a136b4f46f4e647b06d3163b718c726d9b58ad.tar.gz |
Merge branch 'issuable-state-custom-links' into 'master'
Do not append issuable state to links with custom anchor
Closes #30916
See merge request !10782
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 |