Skip to content

Commit

Permalink
Fix #2887
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Aug 10, 2017
1 parent 1a6c922 commit 998cdd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -24,6 +24,7 @@ Features
Bugfixes
--------

* Handle empty slug metadata (Issue #2887)
* Fix crash when compiling empty ``.html`` posts (Issue #2851)
* Make failures to get source commit hash non-fatal in
``github_deploy`` (Issue #2847)
Expand Down
4 changes: 3 additions & 1 deletion nikola/metadata_extractors.py
Expand Up @@ -149,7 +149,9 @@ def _extract_metadata_from_text(self, source_text: str) -> dict:
for line in source_text.split('\n'):
match = self.nikola_re.match(line)
if match:
outdict[match.group(1)] = match.group(2)
k, v = match.group(1), match.group(2)
if v:
outdict[k] = v
return outdict

def write_metadata(self, metadata: dict, comment_wrap=False) -> str:
Expand Down

1 comment on commit 998cdd0

@Kwpolska
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.