From 1cfe61184975f486fe7e48c0c02c3aee33ae9111 Mon Sep 17 00:00:00 2001 From: fri Date: Sat, 3 Jan 2015 08:17:26 +0100 Subject: [PATCH] Fix inverted parameters in regex match --- pelican/contents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/contents.py b/pelican/contents.py index a495327f..b885091e 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -230,7 +230,7 @@ class Content(object): # In order to make everything work in a platform-independent way, let's accept both characters # as valid path separators for {filename} links, and rebuild the correct path internally by # using os.path.join, so that the resulting path will have the correct separator for this platform. - if re.match(path, r'[\\/]'): + if re.match(r'[\\/]', path): # Path begins with the separator character, so it is relative to the root of the website path = os.path.join(*re.split(r'[\\/]', path[1:])) else: