Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Feb 24, 2025
1 parent 33d5f42 commit eee4372
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
8 changes: 0 additions & 8 deletions en/latest/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -741,14 +741,6 @@ abbr, acronym {
cursor: help;
}

.translated {
background-color: rgba(207, 255, 207, 0.2)
}

.untranslated {
background-color: rgba(255, 207, 207, 0.2)
}

/* -- code displays --------------------------------------------------------- */

pre {
Expand Down
13 changes: 8 additions & 5 deletions en/latest/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,11 @@ const Search = {
// perform the search on the required terms
searchTerms.forEach((word) => {
const files = [];
// find documents, if any, containing the query word in their text/title term indices
// use Object.hasOwnProperty to avoid mismatching against prototype properties
const arr = [
{ files: terms[word], score: Scorer.term },
{ files: titleTerms[word], score: Scorer.title },
{ files: terms.hasOwnProperty(word) ? terms[word] : undefined, score: Scorer.term },
{ files: titleTerms.hasOwnProperty(word) ? titleTerms[word] : undefined, score: Scorer.title },
];
// add support for partial matches
if (word.length > 2) {
Expand Down Expand Up @@ -547,8 +549,9 @@ const Search = {

// set score for the word in each file
recordFiles.forEach((file) => {
if (!scoreMap.has(file)) scoreMap.set(file, {});
scoreMap.get(file)[word] = record.score;
if (!scoreMap.has(file)) scoreMap.set(file, new Map());
const fileScores = scoreMap.get(file);
fileScores.set(word, record.score);
});
});

Expand Down Expand Up @@ -587,7 +590,7 @@ const Search = {
break;

// select one (max) score for the file.
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
const score = Math.max(...wordList.map((w) => scoreMap.get(file).get(w)));
// add result to the result list
results.push([
docNames[file],
Expand Down
8 changes: 4 additions & 4 deletions en/latest/advanced/unit-testing/frameworks/custom/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
<h2><a class="toc-backref" href="#id4" role="doc-backlink">TestStatus</a><a class="headerlink" href="#teststatus" title="Link to this heading"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="TestStatus">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TestStatus</span></span><a class="headerlink" href="#TestStatus" title="Link to this definition"></a></dt>
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TestStatus</span></span><a class="headerlink" href="#TestStatus" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Source Code<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://github.com/platformio/platformio-core/blob/develop/platformio/test/result.py">TestStatus</a></p>
Expand Down Expand Up @@ -212,7 +212,7 @@ <h2><a class="toc-backref" href="#id4" role="doc-backlink">TestStatus</a><a clas
<h2><a class="toc-backref" href="#id5" role="doc-backlink">TestCase</a><a class="headerlink" href="#testcase" title="Link to this heading"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="TestCase">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TestCase</span></span><a class="headerlink" href="#TestCase" title="Link to this definition"></a></dt>
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TestCase</span></span><a class="headerlink" href="#TestCase" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Source Code<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://github.com/platformio/platformio-core/blob/develop/platformio/test/result.py">TestCase</a></p>
Expand Down Expand Up @@ -280,7 +280,7 @@ <h2><a class="toc-backref" href="#id5" role="doc-backlink">TestCase</a><a class=
<h2><a class="toc-backref" href="#id6" role="doc-backlink">TestCaseSource</a><a class="headerlink" href="#testcasesource" title="Link to this heading"></a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="TestCaseSource">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TestCaseSource</span></span><a class="headerlink" href="#TestCaseSource" title="Link to this definition"></a></dt>
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">TestCaseSource</span></span><a class="headerlink" href="#TestCaseSource" title="Link to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Source Code<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://github.com/platformio/platformio-core/blob/develop/platformio/test/result.py">TestCaseSource</a></p>
Expand Down Expand Up @@ -310,7 +310,7 @@ <h2><a class="toc-backref" href="#id6" role="doc-backlink">TestCaseSource</a><a
<a class="reference external" href="https://github.com/platformio/platformio-core/tree/develop/platformio/test/runners">already implemented runners</a>.</p>
<dl class="py class">
<dt class="sig sig-object py" id="CustomTestRunner">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">CustomTestRunner</span></span><a class="headerlink" href="#CustomTestRunner" title="Link to this definition"></a></dt>
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">CustomTestRunner</span></span><a class="headerlink" href="#CustomTestRunner" title="Link to this definition"></a></dt>
<dd><blockquote>
<div><dl class="field-list simple">
<dt class="field-odd">Source Code<span class="colon">:</span></dt>
Expand Down
2 changes: 1 addition & 1 deletion en/latest/searchindex.js

Large diffs are not rendered by default.

0 comments on commit eee4372

Please sign in to comment.