search: use both title and subtitle only if different (#10848)

This commit is contained in:
Martin Liška 2022-09-23 19:57:14 +02:00 committed by GitHub
parent 25cbe68c11
commit 73a1ee4560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -286,7 +286,7 @@ const Search = {
let score = Math.round(100 * queryLower.length / title.length)
results.push([
docNames[file],
`${titles[file]} > ${title}`,
titles[file] !== title ? `${titles[file]} > ${title}` : title,
id !== null ? "#" + id : "",
null,
score,