Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam Niedzielski <adamsunday@gmail.com>2017-04-19 18:15:36 +0300
committerAdam Niedzielski <adamsunday@gmail.com>2017-04-19 19:36:12 +0300
commit1269ee4c3bd3a7875fdcd15554b904fab94fba50 (patch)
tree35e47d697dce43be30ce21b1c74cda78b15192cc /lib
parent29ddc15f8d9b094bb7052875f7728ee48f7ad06b (diff)
Do not append issuable state to links with custom anchor
Closes #30916 Change the presentation from [closed] to (closed)
Diffstat (limited to 'lib')
-rw-r--r--lib/banzai/filter/issuable_state_filter.rb4
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