mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fixup 89b28fd
We need to mark the whole doctest string as raw as it contains regular expressions.
This commit is contained in:
parent
623eb0a4c0
commit
f49037e0ca
1 changed files with 4 additions and 4 deletions
|
|
@ -636,7 +636,7 @@ def path_metadata(full_path, source_path, settings=None):
|
|||
|
||||
|
||||
def parse_path_metadata(source_path, settings=None, process=None):
|
||||
"""Extract a metadata dictionary from a file's path
|
||||
r"""Extract a metadata dictionary from a file's path
|
||||
|
||||
>>> import pprint
|
||||
>>> settings = {
|
||||
|
|
@ -650,9 +650,9 @@ def parse_path_metadata(source_path, settings=None, process=None):
|
|||
... settings=settings,
|
||||
... process=reader.process_metadata)
|
||||
>>> pprint.pprint(metadata) # doctest: +ELLIPSIS
|
||||
... {'category': <pelican.urlwrappers.Category object at ...>,
|
||||
... 'date': SafeDatetime(2013, 1, 1, 0, 0),
|
||||
... 'slug': 'my-slug'}
|
||||
{'category': <pelican.urlwrappers.Category object at ...>,
|
||||
'date': SafeDatetime(2013, 1, 1, 0, 0),
|
||||
'slug': 'my-slug'}
|
||||
"""
|
||||
metadata = {}
|
||||
dirname, basename = os.path.split(source_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue