always ADD a leading slash to page.url or post.url
This commit is contained in:
parent
c6df2e150a
commit
d73841c961
|
@ -78,7 +78,7 @@ module Jekyll
|
|||
# sanitize url
|
||||
@url = url.split('/').reject{ |part| part =~ /^\.+$/ }.join('/')
|
||||
@url += "/" if url =~ /\/$/
|
||||
@url.gsub!(/\A\//, '')
|
||||
@url.gsub!(/\A([^\/])/, '/\1')
|
||||
@url
|
||||
end
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ module Jekyll
|
|||
# sanitize url
|
||||
@url = url.split('/').reject{ |part| part =~ /^\.+$/ }.join('/')
|
||||
@url += "/" if url =~ /\/$/
|
||||
@url.gsub!(/\A\//, '')
|
||||
@url.gsub!(/\A([^\/])/, '/\1')
|
||||
@url
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue