Merge pull request #4004 from kevinoid/excerpt-match-post-content

This commit is contained in:
Matt Rogers
2015-10-15 21:13:32 -05:00
3 changed files with 25 additions and 2 deletions

View File

@@ -107,7 +107,11 @@ module Jekyll
def extract_excerpt(post_content)
head, _, tail = post_content.to_s.partition(post.excerpt_separator)
"" << head << "\n\n" << tail.scan(/^\[[^\]]+\]:.+$/).join("\n")
if tail.empty?
head
else
"" << head << "\n\n" << tail.scan(/^\[[^\]]+\]:.+$/).join("\n")
end
end
end
end