Skip to content

Commit 3d41285

Browse files
committed
deploy: 6b441ad
1 parent a5062b5 commit 3d41285

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 79359126f93517a4bdf699543d5a504c
3+
config: 2f769eb5ffa478c329f8216e12149640
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_static/searchtools.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ const Search = {
178178

179179
htmlToText: (htmlString, anchor) => {
180180
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
181-
for (const removalQuery of [".headerlinks", "script", "style"]) {
181+
for (const removalQuery of [".headerlink", "script", "style"]) {
182182
htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() });
183183
}
184184
if (anchor) {
@@ -328,13 +328,14 @@ const Search = {
328328
for (const [title, foundTitles] of Object.entries(allTitles)) {
329329
if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) {
330330
for (const [file, id] of foundTitles) {
331-
let score = Math.round(100 * queryLower.length / title.length)
331+
const score = Math.round(Scorer.title * queryLower.length / title.length);
332+
const boost = titles[file] === title ? 1 : 0; // add a boost for document titles
332333
normalResults.push([
333334
docNames[file],
334335
titles[file] !== title ? `${titles[file]} > ${title}` : title,
335336
id !== null ? "#" + id : "",
336337
null,
337-
score,
338+
score + boost,
338339
filenames[file],
339340
]);
340341
}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ <h1>diffpy.utils documentation<a class="headerlink" href="#diffpy-utils-document
8484
<p>diffpy.utils - general purpose shared utilities for the diffpy libraries.</p>
8585
<div class="line-block">
8686
<div class="line">Software version 3.4.0.</div>
87-
<div class="line">Last updated July 04, 2024.</div>
87+
<div class="line">Last updated September 08, 2024.</div>
8888
</div>
8989
<p>The diffpy.utils package provides general functions for extracting data from variously formatted text files as well as
9090
some PDF-specific functionality. These include wx GUI utilities used by the PDFgui program and an interpolation function

0 commit comments

Comments
 (0)