diff options
Diffstat (limited to 'lib/gitlab/gfm/reference_rewriter.rb')
-rw-r--r-- | lib/gitlab/gfm/reference_rewriter.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/gfm/reference_rewriter.rb b/lib/gitlab/gfm/reference_rewriter.rb index 5f906d07177..47e1aa67976 100644 --- a/lib/gitlab/gfm/reference_rewriter.rb +++ b/lib/gitlab/gfm/reference_rewriter.rb @@ -38,6 +38,8 @@ module Gitlab end def rewrite(target_project) + return @text unless needs_rewrite? + @text.gsub(@pattern) do |reference| unfold_reference(reference, Regexp.last_match, target_project) end |