Skip to content

Commit

Permalink
handle non-splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Jun 9, 2015
1 parent 3982fbc commit 6062eeb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nikola/plugin_categories.py
Expand Up @@ -276,8 +276,10 @@ def split_metadata(self, data):
This splits in the first empty line that is NOT at the beginning
of the document."""

return re.split('(\n\n|\r\n\r\n)', data.lstrip(), maxsplit=1)
splitted = re.split('(\n\n|\r\n\r\n)', data.lstrip(), maxsplit=1)
if len(splitted) == 1:
return '', splitted[0]
return splitted


class RestExtension(BasePlugin):
Expand Down

0 comments on commit 6062eeb

Please sign in to comment.