The old regex turns 'a/b/c/' into 'a/' which is not correct.
The new regex is directory aware.
This commit is contained in:
bootstraponline
2012-07-27 12:14:06 -06:00
parent 8558777ece
commit 804c4c678d
+1 -1
View File
@@ -158,7 +158,7 @@ module Gollum
# Returns the String url_path # Returns the String url_path
def url_path def url_path
path = if self.path.include?('/') path = if self.path.include?('/')
self.path.sub(/\/.+$/, '/') self.path.sub(/\/[^\/]+$/, '/')
else else
'' ''
end end