Commit 3682a082 authored by Marin Jankovski's avatar Marin Jankovski

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

parent 06d6f443
...@@ -64,11 +64,11 @@ module GitlabMarkdownHelper ...@@ -64,11 +64,11 @@ module GitlabMarkdownHelper
links.each do |string| links.each do |string|
new_link = [ new_link = [
project_path_with_namespace, project_path_with_namespace,
wiki ? "wiki":"blob", wiki ? "wikis":"blob",
ref, ref,
string string
].compact.join("/") ].compact.join("/")
text.gsub!(string, "/#{new_link}") text.gsub!("](#{string})", "](/#{new_link})")
end end
text text
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment