Skip to content

Commit

Permalink
better blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Alsina committed Jun 5, 2017
1 parent 3bd9cb5 commit cf5dcc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nikola/utils.py
Expand Up @@ -1467,12 +1467,12 @@ def write_metadata(data, _format='nikola'):
if _format == 'yaml':
if yaml is None:
req_missing('pyyaml', 'use YAML metadata', optional=False)
return '\n'.join(('---', yaml.safe_dump(data, default_flow_style=False), '---', ''))
return '\n'.join(('---', yaml.safe_dump(data, default_flow_style=False).strip(), '---', '', ''))

elif _format == 'toml':
if toml is None:
req_missing('toml', 'use TOML metadata', optional=False)
return '\n'.join(('+++', toml.dumps(data), '+++', ''))
return '\n'.join(('+++', toml.dumps(data).strip(), '+++', '', ''))

elif _format == 'pelican_rest':
title = data.pop('title')
Expand Down

0 comments on commit cf5dcc9

Please sign in to comment.