Fix #446.
The old regex turns 'a/b/c/' into 'a/' which is not correct. The new regex is directory aware.
This commit is contained in:
+1
-1
@@ -158,7 +158,7 @@ module Gollum
|
||||
# Returns the String url_path
|
||||
def url_path
|
||||
path = if self.path.include?('/')
|
||||
self.path.sub(/\/.+$/, '/')
|
||||
self.path.sub(/\/[^\/]+$/, '/')
|
||||
else
|
||||
''
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user