Skip to content
Permalink
Browse files

handle non-splitting

  • Loading branch information
ralsina committed Jun 9, 2015
1 parent 3982fbc commit 6062eeb093e9ec385a05c4623a190f16f5fdebb4
Showing with 4 additions and 2 deletions.
  1. +4 −2 nikola/plugin_categories.py
@@ -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):

0 comments on commit 6062eeb

Please sign in to comment.
You can’t perform that action at this time.