diff --git a/crates/docs/src/static/search.js b/crates/docs/src/static/search.js index 7fced7e2d9..5d404a0ce0 100644 --- a/crates/docs/src/static/search.js +++ b/crates/docs/src/static/search.js @@ -69,17 +69,17 @@ try{ document.createEvent("TouchEvent"); return true; } catch(e){ return false; } } - + // Select all elements that are children of
 elements
   const codeBlocks = document.querySelectorAll("pre > samp");
-  
+
   // Iterate over each code block
   codeBlocks.forEach((codeBlock) => {
     // Create a "Copy" button
     const copyButton = document.createElement("button");
     copyButton.classList.add("copy-button");
     copyButton.textContent = "Copy";
-  
+
     // Add event listener to copy button
     copyButton.addEventListener("click", () => {
       const codeText = codeBlock.innerText;
@@ -91,16 +91,16 @@
           copyButton.classList.remove('copy-button-copied');
       });
     });
-  
+
     // Create a container for the copy button and append it to the document
     const buttonContainer = document.createElement("div");
     buttonContainer.classList.add("button-container");
     buttonContainer.appendChild(copyButton);
     codeBlock.parentNode.insertBefore(buttonContainer, codeBlock);
-  
+
     // Hide the button container by default
     buttonContainer.style.display = "none";
-  
+
     if (isTouchSupported()) {
       // Show the button container on click for touch support (e.g. mobile)
       document.addEventListener("click", (event) => {
@@ -115,10 +115,10 @@
       codeBlock.parentNode.addEventListener("mouseenter", () => {
         buttonContainer.style.display = "block";
       });
-  
+
       codeBlock.parentNode.addEventListener("mouseleave", () => {
         buttonContainer.style.display = "none";
-      });  
+      });
     }
   });
 })();