Commit 5fc22bfa authored by Stefan Hanreich's avatar Stefan Hanreich

updated regex to use beginning / ending of string metacharacters

parent e02ca5fd
......@@ -191,7 +191,7 @@ module Ci
def ref_slug
slugified = ref.to_s.downcase
slugified = slugified.gsub(/[^a-z0-9]/, '-')[0..62]
slugified.gsub(/(^\-+|\-+$)/, '')
slugified.gsub(/(\A-+|-+\z)/, '')
end
# Variables whose value does not depend on other variables
......
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