Skip to content

Commit

Permalink
handle <!--more--> correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
chekun committed Mar 17, 2020
1 parent 35fe907 commit ed649af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hexo-excerpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function(db) {
return db.posts.map(post => {

//honour the <!-- more --> !!!
if (/<!--\s*more\s*-->/.test(post.content)) {
if (/<!--\s*more\s*-->/.test(post.content) || post.content.indexOf('<a id="more"></a>') !== -1) {
return {
path: post.path,
data: post,
Expand Down

0 comments on commit ed649af

Please sign in to comment.