Mercurial > piecrust2
diff piecrust/uriutil.py @ 495:4284c673bb91
internal: Fix some edge-cases for splitting sub-URIs.
A given URI may or may not have a trailing slash, regardless of the
`trailing_slash` configuration setting. Add unit tests to check those cases.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 23 Jul 2015 22:11:59 -0700 |
parents | d4321317beae |
children | e85f29b28b84 |
line wrap: on
line diff
--- a/piecrust/uriutil.py Thu Jul 23 22:09:00 2015 -0700 +++ b/piecrust/uriutil.py Thu Jul 23 22:11:59 2015 -0700 @@ -92,7 +92,7 @@ trailing_slash = app.config.get('site/trailing_slash') if not pretty_urls: uri, ext = os.path.splitext(uri) - elif trailing_slash: + else: uri = uri.rstrip('/') page_num = 1