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
links.each do |string|
new_link = [
project_path_with_namespace,
wiki ? "wiki":"blob",
wiki ? "wikis":"blob",
ref,
string
].compact.join("/")
text.gsub!(string, "/#{new_link}")
text.gsub!("](#{string})", "](/#{new_link})")
end
text
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