diff options
author | Robert Speicher <robert@gitlab.com> | 2017-06-28 18:24:01 +0300 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-06-29 01:11:28 +0300 |
commit | e5d539add6d105722605f2163f22d2343e877962 (patch) | |
tree | 5e2bf24329df549d4992594e17dbbf38675ee0e0 /lib | |
parent | 53277e0ad90641dde4c127b4dfb4fef8d6cc8499 (diff) |
Merge branch 'dm-dependency-linker-newlines' into 'master'
Fix diff of requirements.txt file by not matching newlines as part of package names
Closes #34321
See merge request !12495
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/dependency_linker/base_linker.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/dependency_linker/base_linker.rb b/lib/gitlab/dependency_linker/base_linker.rb index 7bbd154eb03..d2360583741 100644 --- a/lib/gitlab/dependency_linker/base_linker.rb +++ b/lib/gitlab/dependency_linker/base_linker.rb @@ -52,7 +52,7 @@ module Gitlab # # Will link `user/repo` in `github: "user/repo"` or `:github => "user/repo"` def link_regex(regex, &url_proc) highlighted_lines.map!.with_index do |rich_line, i| - marker = StringRegexMarker.new(plain_lines[i], rich_line.html_safe) + marker = StringRegexMarker.new(plain_lines[i].chomp, rich_line.html_safe) marker.mark(regex, group: :name) do |text, left:, right:| url = yield(text) |