diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-01 14:18:51 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-17 07:39:15 +0100 |
commit | cd0f19450843b5b9245ae82302d3f9d9003cb899 (patch) | |
tree | e314a1b4b4791f75fb187be580999fc2969afbf2 /lib | |
parent | 9124ebce982981b74ae644793a680b2b6060ce21 (diff) | |
download | gitlab-ce-cd0f19450843b5b9245ae82302d3f9d9003cb899.tar.gz |
Do not unfold non-referables when moving an issue
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/reference_unfold_filter.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/banzai/filter/reference_unfold_filter.rb b/lib/banzai/filter/reference_unfold_filter.rb index d8ed44a0e4e..70a485ba2ae 100644 --- a/lib/banzai/filter/reference_unfold_filter.rb +++ b/lib/banzai/filter/reference_unfold_filter.rb @@ -21,6 +21,8 @@ module Banzai def call @referables.each do |referable| + next unless referable.respond_to?(:to_reference) + pattern = /#{Regexp.escape(referable.to_reference)}/ @text.gsub!(pattern, referable.to_reference(@new_project)) end |