Skip to content

Commit 2a8f84b

Browse files
committed
Deploying to gh-pages from @ bd8eea5 🚀
1 parent 8c0ac0b commit 2a8f84b

File tree

5 files changed

+9
-16
lines changed

5 files changed

+9
-16
lines changed

_static/basic.css

-8
Original file line numberDiff line numberDiff line change
@@ -741,14 +741,6 @@ abbr, acronym {
741741
cursor: help;
742742
}
743743

744-
.translated {
745-
background-color: rgba(207, 255, 207, 0.2)
746-
}
747-
748-
.untranslated {
749-
background-color: rgba(255, 207, 207, 0.2)
750-
}
751-
752744
/* -- code displays --------------------------------------------------------- */
753745

754746
pre {

_static/searchtools.js

+8-5
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,11 @@ const Search = {
513513
// perform the search on the required terms
514514
searchTerms.forEach((word) => {
515515
const files = [];
516+
// find documents, if any, containing the query word in their text/title term indices
517+
// use Object.hasOwnProperty to avoid mismatching against prototype properties
516518
const arr = [
517-
{ files: terms[word], score: Scorer.term },
518-
{ files: titleTerms[word], score: Scorer.title },
519+
{ files: terms.hasOwnProperty(word) ? terms[word] : undefined, score: Scorer.term },
520+
{ files: titleTerms.hasOwnProperty(word) ? titleTerms[word] : undefined, score: Scorer.title },
519521
];
520522
// add support for partial matches
521523
if (word.length > 2) {
@@ -547,8 +549,9 @@ const Search = {
547549

548550
// set score for the word in each file
549551
recordFiles.forEach((file) => {
550-
if (!scoreMap.has(file)) scoreMap.set(file, {});
551-
scoreMap.get(file)[word] = record.score;
552+
if (!scoreMap.has(file)) scoreMap.set(file, new Map());
553+
const fileScores = scoreMap.get(file);
554+
fileScores.set(word, record.score);
552555
});
553556
});
554557

@@ -587,7 +590,7 @@ const Search = {
587590
break;
588591

589592
// select one (max) score for the file.
590-
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
593+
const score = Math.max(...wordList.map((w) => scoreMap.get(file).get(w)));
591594
// add result to the result list
592595
results.push([
593596
docNames[file],

examples/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<script src="../_static/documentation_options.js?v=84e44b8a"></script>
1919
<script src="../_static/doctools.js?v=9bcbadda"></script>
2020
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
21-
<script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
2221
<script src="../_static/js/theme.js"></script>
2322
<link rel="index" title="Index" href="../genindex.html" />
2423
<link rel="search" title="Search" href="../search.html" />

examples/python.html

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<script src="../_static/documentation_options.js?v=84e44b8a"></script>
1919
<script src="../_static/doctools.js?v=9bcbadda"></script>
2020
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
21-
<script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
2221
<script src="../_static/js/theme.js"></script>
2322
<link rel="index" title="Index" href="../genindex.html" />
2423
<link rel="search" title="Search" href="../search.html" />

searchindex.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)