From e72a7192d26e045c2531f29ae350e3e27f08efa6 Mon Sep 17 00:00:00 2001 From: Matthew Newville Date: Thu, 12 Sep 2024 22:36:19 -0500 Subject: [PATCH] update docs for 1.0.3 --- _static/documentation_options.js | 2 +- _static/searchtools.js | 7 ++++--- api.html | 10 +++++----- asteval.pdf | Bin 226542 -> 232873 bytes asteval_doc.zip | Bin 315783 -> 1288395 bytes basics.html | 10 +++++----- genindex.html | 10 +++++----- index.html | 12 ++++++------ installation.html | 14 +++++++------- motivation.html | 10 +++++----- py-modindex.html | 10 +++++----- search.html | 10 +++++----- searchindex.js | 2 +- 13 files changed, 49 insertions(+), 48 deletions(-) diff --git a/_static/documentation_options.js b/_static/documentation_options.js index d39c5a9..fc2b2f3 100644 --- a/_static/documentation_options.js +++ b/_static/documentation_options.js @@ -1,5 +1,5 @@ const DOCUMENTATION_OPTIONS = { - VERSION: '1.0.2.post1', + VERSION: '1.0.3', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/_static/searchtools.js b/_static/searchtools.js index 92da3f8..b08d58c 100644 --- a/_static/searchtools.js +++ b/_static/searchtools.js @@ -178,7 +178,7 @@ const Search = { htmlToText: (htmlString, anchor) => { const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); - for (const removalQuery of [".headerlinks", "script", "style"]) { + for (const removalQuery of [".headerlink", "script", "style"]) { htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); } if (anchor) { @@ -328,13 +328,14 @@ const Search = { for (const [title, foundTitles] of Object.entries(allTitles)) { if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { for (const [file, id] of foundTitles) { - let score = Math.round(100 * queryLower.length / title.length) + const score = Math.round(Scorer.title * queryLower.length / title.length); + const boost = titles[file] === title ? 1 : 0; // add a boost for document titles normalResults.push([ docNames[file], titles[file] !== title ? `${titles[file]} > ${title}` : title, id !== null ? "#" + id : "", null, - score, + score + boost, filenames[file], ]); } diff --git a/api.html b/api.html index 33ea024..750ba81 100644 --- a/api.html +++ b/api.html @@ -10,7 +10,7 @@ - + @@ -23,7 +23,7 @@ -