Skip to content

Commit 67b20ee

Browse files
committed
Document potentially confusing split_metadata_from_text behavior
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
1 parent d482f68 commit 67b20ee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nikola/plugin_categories.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,11 @@ def _extract_metadata_from_text(self, source_text: str) -> dict:
404404
raise NotImplementedError()
405405

406406
def split_metadata_from_text(self, source_text: str) -> (str, str):
407-
"""Split text into metadata and content (both strings)."""
407+
"""Split text into metadata and content (both strings).
408+
409+
If splitting fails (there is no match), return source_text as both metadata and content.
410+
(This behavior is required for 2-file posts.)
411+
"""
408412
if self.split_metadata_re is None:
409413
return source_text, source_text
410414
else:

0 commit comments

Comments
 (0)