Przeglądaj źródła

Deploying to readthedocs from @ chillerlan/php-qrcode@965146f2109224fdc4be3340331529e0e7c7b2c3 🚀

codemasher 9 miesięcy temu
rodzic
commit
c630e46996
4 zmienionych plików z 9 dodań i 14 usunięć
  1. 0 8
      _static/basic.css
  2. 8 5
      _static/searchtools.js
  3. 1 1
      index.html
  4. 0 0
      searchindex.js

+ 0 - 8
_static/basic.css

@@ -741,14 +741,6 @@ abbr, acronym {
     cursor: help;
     cursor: help;
 }
 }
 
 
-.translated {
-    background-color: rgba(207, 255, 207, 0.2)
-}
-
-.untranslated {
-    background-color: rgba(255, 207, 207, 0.2)
-}
-
 /* -- code displays --------------------------------------------------------- */
 /* -- code displays --------------------------------------------------------- */
 
 
 pre {
 pre {

+ 8 - 5
_static/searchtools.js

@@ -513,9 +513,11 @@ const Search = {
     // perform the search on the required terms
     // perform the search on the required terms
     searchTerms.forEach((word) => {
     searchTerms.forEach((word) => {
       const files = [];
       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 = [
       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
       // add support for partial matches
       if (word.length > 2) {
       if (word.length > 2) {
@@ -547,8 +549,9 @@ const Search = {
 
 
         // set score for the word in each file
         // set score for the word in each file
         recordFiles.forEach((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);
         });
         });
       });
       });
 
 
@@ -587,7 +590,7 @@ const Search = {
         break;
         break;
 
 
       // select one (max) score for the file.
       // 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
       // add result to the result list
       results.push([
       results.push([
         docNames[file],
         docNames[file],

+ 1 - 1
index.html

@@ -359,7 +359,7 @@
              
              
   <section id="chillerlan-php-qrcode-manual">
   <section id="chillerlan-php-qrcode-manual">
 <h1>chillerlan PHP-QRCode Manual<a class="headerlink" href="#chillerlan-php-qrcode-manual" title="Link to this heading"></a></h1>
 <h1>chillerlan PHP-QRCode Manual<a class="headerlink" href="#chillerlan-php-qrcode-manual" title="Link to this heading"></a></h1>
-<p>User manual for <a class="reference external" href="https://github.com/chillerlan/php-qrcode/">chillerlan/php-qrcode</a>  [main]. Updated on Nov 27, 2024.</p>
+<p>User manual for <a class="reference external" href="https://github.com/chillerlan/php-qrcode/">chillerlan/php-qrcode</a>  [main]. Updated on Mar 14, 2025.</p>
 <p>The phpDocumentor API documentation can be found at <a class="reference external" href="https://chillerlan.github.io/php-qrcode/">chillerlan.github.io/php-qrcode</a>.</p>
 <p>The phpDocumentor API documentation can be found at <a class="reference external" href="https://chillerlan.github.io/php-qrcode/">chillerlan.github.io/php-qrcode</a>.</p>
 <p>This work is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) License.</p>
 <p>This work is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) License.</p>
 <div class="toctree-wrapper compound">
 <div class="toctree-wrapper compound">

Plik diff jest za duży
+ 0 - 0
searchindex.js


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików