Just swallow it if there is no content for the excerpt to parse.

This commit is contained in:
Parker Moore 2014-10-20 21:45:17 -07:00
parent 3762878381
commit b4a2788626
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ module Jekyll
# Returns excerpt String # Returns excerpt String
def extract_excerpt(post_content) def extract_excerpt(post_content)
separator = site.config['excerpt_separator'] separator = site.config['excerpt_separator']
head, _, tail = post_content.partition(separator) head, _, tail = post_content.to_s.partition(separator)
"" << head << "\n\n" << tail.scan(/^\[[^\]]+\]:.+$/).join("\n") "" << head << "\n\n" << tail.scan(/^\[[^\]]+\]:.+$/).join("\n")
end end