Skip to content

Commit 66d8fdb

Browse files
committed
マージ
1 parent 9600e69 commit 66d8fdb

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

_build/doctrees/environment.pickle

0 Bytes
Binary file not shown.

docs/_static/basic.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,14 @@ 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+
744752
/* -- code displays --------------------------------------------------------- */
745753

746754
pre {

docs/_static/searchtools.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -513,11 +513,9 @@ 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
518516
const arr = [
519-
{ files: terms.hasOwnProperty(word) ? terms[word] : undefined, score: Scorer.term },
520-
{ files: titleTerms.hasOwnProperty(word) ? titleTerms[word] : undefined, score: Scorer.title },
517+
{ files: terms[word], score: Scorer.term },
518+
{ files: titleTerms[word], score: Scorer.title },
521519
];
522520
// add support for partial matches
523521
if (word.length > 2) {
@@ -549,9 +547,8 @@ const Search = {
549547

550548
// set score for the word in each file
551549
recordFiles.forEach((file) => {
552-
if (!scoreMap.has(file)) scoreMap.set(file, new Map());
553-
const fileScores = scoreMap.get(file);
554-
fileScores.set(word, record.score);
550+
if (!scoreMap.has(file)) scoreMap.set(file, {});
551+
scoreMap.get(file)[word] = record.score;
555552
});
556553
});
557554

@@ -590,7 +587,7 @@ const Search = {
590587
break;
591588

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

0 commit comments

Comments
 (0)