Skip to content
Permalink
Browse files
Support empty post files
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Aug 1, 2018
1 parent 86a5f8b commit a8fc0e8610ceaee70e5abfc1f65c8b2909e42bae
Showing with 2 additions and 0 deletions.
  1. +2 −0 nikola/plugin_categories.py
@@ -435,6 +435,8 @@ def split_metadata_from_text(self, source_text: str) -> (str, str):
def extract_text(self, source_text: str) -> 'typing.Dict[str, str]':
"""Split file, return metadata and the content."""
split = self.split_metadata_from_text(source_text)
if not split:
return {}
meta = self._extract_metadata_from_text(split[0])
return meta

0 comments on commit a8fc0e8

Please sign in to comment.