Skip to content
Browse files

Slightly smarter return values for split_metadata_for_text

Signed-off-by: Chris Warrick <>
  • Loading branch information
Kwpolska committed Jul 7, 2017
1 parent 2e05f03 commit f8d1814d93fa95d7a02af89429b8da2a7e1cea7e
Showing with 2 additions and 3 deletions.
  1. +2 −3 nikola/
@@ -410,10 +410,9 @@ def split_metadata_from_text(self, source_text: str) -> (str, str):
split_result = self.split_metadata_re.split(source_text.lstrip(), maxsplit=1)
if len(split_result) == 1:
return split_result[0], split_result[0]
return source_text, source_text
# Necessary?
return split_result[0], split_result[-1]
return split_result

def extract_text(self, source_text: str) -> dict:
"""Extract metadata from text (also calls ``split_metadata_from_text``)."""

0 comments on commit f8d1814

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