Skip to content

Commit

Permalink
Merge pull request #1 from geekrainy/patch-1
Browse files Browse the repository at this point in the history
Fix Hexo local search error.
  • Loading branch information
artchen committed Sep 5, 2018
2 parents 9f4dcc2 + 27b8afd commit 3f64eea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/services/hexo-local-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var HexoSearch;
*/
self.contentSearch = function(post, queryText) {
var post_title = post.title.trim().toLowerCase(),
post_content = post.text.trim().toLowerCase(),
post_content = post.content.trim().toLowerCase(),
keywords = queryText.trim().toLowerCase().split(" "),
foundMatch = false,
index_title = -1,
Expand All @@ -44,7 +44,7 @@ var HexoSearch;
}
}
if (foundMatch) {
post_content = post.text.trim();
post_content = post.content.trim();
var start = 0, end = 0;
if (first_occur >= 0) {
start = Math.max(first_occur-30, 0);
Expand Down Expand Up @@ -138,4 +138,4 @@ var HexoSearch;
return self;
};

})(jQuery);
})(jQuery);

0 comments on commit 3f64eea

Please sign in to comment.