Skip to content
Permalink
Browse files

better split

  • Loading branch information
ralsina committed Jun 6, 2017
1 parent c638cee commit d2f99ebcf578b510b052ecdf77d3b107b871b35b
Showing with 2 additions and 2 deletions.
  1. +2 −2 nikola/plugin_categories.py
@@ -339,9 +339,9 @@ def split_metadata(self, data):
of the document.
"""
if data.startswith('---'): # YAML metadata
split_result = re.split('(---\n\n|----\r\n\r\n)', data.lstrip(), maxsplit=1)
split_result = re.split('(\n---\n\n|\r\n---\r\n\r\n)', data.lstrip(), maxsplit=1)
elif data.startswith('+++'): # TOML metadata
split_result = re.split('(+++\n\n|+++\r\n\r\n)', data.lstrip(), maxsplit=1)
split_result = re.split('(\n+++\n\n|\r\n+++\r\n\r\n)', data.lstrip(), maxsplit=1)
else:
split_result = re.split('(\n\n|\r\n\r\n)', data.lstrip(), maxsplit=1)
if len(split_result) == 1:

0 comments on commit d2f99eb

Please sign in to comment.