Skip to content

Commit

Permalink
Simplification.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Jul 1, 2017
1 parent b8729ea commit cf2abe6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions nikola/post.py
Expand Up @@ -991,12 +991,9 @@ def get_metadata_from_file(source_path, config=None, lang=None):
def _get_metadata_from_file(file_lines, config=None):
"""Extract metadata from a post's source file."""
meta, metadata_type = utils.extract_metadata(file_lines)
if metadata_type == 'yaml':
if metadata_type in ('toml', 'yaml'):
# Map metadata from other platforms to names Nikola expects (Issue #2817)
map_metadata(meta, 'yaml', config)
if metadata_type == 'toml':
# Map metadata from other platforms to names Nikola expects (Issue #2817)
map_metadata(meta, 'toml', config)
map_metadata(meta, metadata_type, config)
return meta


Expand Down

0 comments on commit cf2abe6

Please sign in to comment.