We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3596590 commit 451de8eCopy full SHA for 451de8e
sphinx/themes/basic/static/searchtools.js
@@ -288,9 +288,9 @@ const Search = {
288
let results = [];
289
_removeChildren(document.getElementById("search-progress"));
290
291
- const queryLower = query.toLowerCase();
+ const queryLower = query.toLowerCase().trim();
292
for (const [title, foundTitles] of Object.entries(allTitles)) {
293
- if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
+ if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) {
294
for (const [file, id] of foundTitles) {
295
let score = Math.round(100 * queryLower.length / title.length)
296
results.push([
0 commit comments