AlexJF/pelican-autostatic — pull request #4 by Schnouki (2014-12-08 17:56:46+00:00)
Title: Fix backreference in a character class

The `re` module doc states that "Inside the '[' and ']' of a character class, all numeric escapes are treated as characters" (instead of group matches). This causes `[^\1=] to be considered as "not the character \001 nor =" instead of "not the characters matched in the first group nor =", which in turns causes an error when trying to include a file with spaces with `{static "/files/2014/my file.pdf"}`:

WARNING: Cannot get modification stamp for /path/to/blog/content/"/files/2014/my
|	[Errno 2] No such file or directory: '/path/to/blog/content/"/files/2014/my'
CRITICAL: [Errno 2] No such file or directory: '/path/to/blog/content/"/files/2014/my'

This can be avoided by using the `(?P=name)` form.

(Only tested on Python 3.4.2 with Pelican 3.5.0).