Commit f78fa4c9 authored by Tomislav Nikić's avatar Tomislav Nikić

Fixing some minor regex error

Fixing some regular expression errors
that were causing problems on staging.
parent 0813a73d
......@@ -31,7 +31,9 @@ module QA
def web_url
# TODO
# workaround
repository_http_uri.to_s.gsub(".wiki.git", "/-/wikis/#{@file_name.gsub('.md', '')}")
# i.e. This replaces the last occurence of the string (case sensitive)
# and attaches everything before to the new substring
repository_http_uri.to_s.gsub(/(.*)\b\.wiki\.git\b/i, "\\1/-/wikis/#{@file_name.gsub('.md', '')}")
end
end
end
......
......@@ -58,7 +58,9 @@ module QA
def switching_to_wiki_url(url)
# TODO
# workaround
Git::Location.new(url.to_s.gsub('.git', '.wiki.git'))
# i.e. This replaces the last occurence of the string (case sensitive)
# and attaches everything before to the new substring
Git::Location.new(url.to_s.gsub(/(.*)\bgit\b/i, '\1wiki.git'))
end
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