mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Merge pull request #4004 from kevinoid/excerpt-match-post-content
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user