mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fix more python 3.6 regex DeprecationWarning's
This commit is contained in:
parent
cfcf40f1f8
commit
623eb0a4c0
5 changed files with 26 additions and 26 deletions
|
|
@ -111,10 +111,10 @@ class Pelican(object):
|
|||
structure = self.settings['ARTICLE_PERMALINK_STRUCTURE']
|
||||
|
||||
# Convert %(variable) into {variable}.
|
||||
structure = re.sub(r'%\((\w+)\)s', '{\g<1>}', structure)
|
||||
structure = re.sub(r'%\((\w+)\)s', r'{\g<1>}', structure)
|
||||
|
||||
# Convert %x into {date:%x} for strftime
|
||||
structure = re.sub(r'(%[A-z])', '{date:\g<1>}', structure)
|
||||
structure = re.sub(r'(%[A-z])', r'{date:\g<1>}', structure)
|
||||
|
||||
# Strip a / prefix
|
||||
structure = re.sub('^/', '', structure)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue