diff piecrust/routing.py @ 154:a42469dbdc47

Match routes completely, not partially.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 27 Dec 2014 16:47:44 -0800
parents ab6e7e0e9d44
children 0a86a7a6b284
line wrap: on
line diff
--- a/piecrust/routing.py	Thu Dec 04 12:49:53 2014 -0800
+++ b/piecrust/routing.py	Sat Dec 27 16:47:44 2014 -0800
@@ -26,7 +26,7 @@
         self.uri_root = app.config.get('site/root').rstrip('/') + '/'
         self.uri_pattern = uri.lstrip('/')
         self.uri_format = route_re.sub(self._uriFormatRepl, self.uri_pattern)
-        p = route_re.sub(self._uriPatternRepl, self.uri_pattern)
+        p = route_re.sub(self._uriPatternRepl, self.uri_pattern) + '$'
         self.uri_re = re.compile(p)
         self.source_name = cfg['source']
         self.taxonomy = cfg.get('taxonomy')