Skip to content

Commit aec26d2

Browse files
committed
Review feedback
1 parent f9c48bb commit aec26d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sphinx/themes/basic/static/searchtools.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,11 @@ const Search = {
305305
for (const [file, id] of foundTitles) {
306306
let score = Math.round(100 * queryLower.length / title.length)
307307
let isDocumentTitle = titles[file] === title
308-
let sectionId = id ? "#" + id : ""
308+
let anchor = id ? `#${id}` : ""
309309
results.push([
310310
docNames[file],
311311
isDocumentTitle ? title : `${titles[file]} > ${title}`,
312-
isDocumentTitle ? "" : sectionId, // don't use the section id if we matched on the exact document title (creates duplicates below)
312+
isDocumentTitle ? "" : anchor, // don't provide an anchor if we matched on the exact document title (creates duplicates below)
313313
null,
314314
score,
315315
filenames[file],

0 commit comments

Comments
 (0)