lib/gollum-lib/helpers.rb in gitlab-gollum-lib-1.1.0 vs lib/gollum-lib/helpers.rb in gitlab-gollum-lib-4.2.7

- old
+ new

@@ -1,12 +1,12 @@ # ~*~ encoding: utf-8 ~*~ module Gollum module Helpers - def trim_leading_slash url + def trim_leading_slash(url) return url if url.nil? - url.gsub!('%2F','/') - return '/' + url.gsub(/^\/+/,'') if url[0,1] == '/' + url.gsub!('%2F', '/') + return '/' + url.gsub(/^\/+/, '') if url[0, 1] == '/' url end end end