mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Update paginator.py
Use str.startswith('/') to check whether 'ret' starts with a slash. The original code fails when 'ret' is an empty string, such as when INDEX_URL is set to "".
This commit is contained in:
parent
208332c0e6
commit
8bb9e0da48
1 changed files with 1 additions and 1 deletions
|
|
@ -155,7 +155,7 @@ class Page:
|
|||
# changed to lstrip() because that would remove all leading slashes and
|
||||
# thus make the workaround impossible. See
|
||||
# test_custom_pagination_pattern() for a verification of this.
|
||||
if ret[0] == '/':
|
||||
if ret.startswith('/'):
|
||||
ret = ret[1:]
|
||||
return ret
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue