Skip to content

Commit

Permalink
Update search.js
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhibbitts committed Jun 21, 2024
1 parent a3a0244 commit ab7c545
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/assets/vendor/docsify/plugins/preview/custom/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,16 @@
title: handlePostTitle,
content: (
// Convert both postPageTitle and handlePostTitle to lowercase for case-insensitive comparison
postPageTitle && postPageTitle.toLowerCase() !== handlePostTitle.toLowerCase()
postPageTitle &&
postPageTitle.toLowerCase() !== handlePostTitle.toLowerCase() &&
postPageTitle.toLowerCase() !== 'readme' // Exclude 'ReadMe' from being prepended
? `<strong>${postPageTitle}</strong><br>`
: ''
) + (postContent ? resultStr : ''),
url: postUrl,
score: matchesScore,
};

matchingResults.push(matchingPost);
}
}
Expand Down

0 comments on commit ab7c545

Please sign in to comment.