]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🐛 Fix copy button in custom.js (#14722)
authorfcharrier <fcharrie@yahoo.fr>
Fri, 16 Jan 2026 10:53:45 +0000 (11:53 +0100)
committerGitHub <noreply@github.com>
Fri, 16 Jan 2026 10:53:45 +0000 (10:53 +0000)
docs/en/docs/js/custom.js

index 48e95901d58e38ae54a542bbc87ab757af7324e4..be326d30297ac74bd0880ba21776838a403e3fc5 100644 (file)
@@ -81,8 +81,14 @@ function setupTermynal() {
                     }
                 }
                 saveBuffer();
+                const inputCommands = useLines
+                    .filter(line => line.type === "input")
+                    .map(line => line.value)
+                    .join("\n");
+                node.textContent = inputCommands;
                 const div = document.createElement("div");
-                node.replaceWith(div);
+                node.style.display = "none";
+                node.after(div);
                 const termynal = new Termynal(div, {
                     lineData: useLines,
                     noInit: true,