Commit 3682a0820be8c5e3b6f368cb121fca3f23fc6f87

Authored by Marin Jankovski
1 parent 06d6f443

Match the brackets so we don't replace the regular text.

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
app/helpers/gitlab_markdown_helper.rb
... ... @@ -64,11 +64,11 @@ module GitlabMarkdownHelper
64 64 links.each do |string|
65 65 new_link = [
66 66 project_path_with_namespace,
67   - wiki ? "wiki":"blob",
  67 + wiki ? "wikis":"blob",
68 68 ref,
69 69 string
70 70 ].compact.join("/")
71   - text.gsub!(string, "/#{new_link}")
  71 + text.gsub!("](#{string})", "](/#{new_link})")
72 72 end
73 73 text
74 74 end
... ...