diff --git a/.buildinfo b/.buildinfo index 6dee1306..678a4d24 100755 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file records the configuration used when building these files. When it is not found, a full rebuild will be done. -config: e26e7d4613b59c9dae9ef0aeba6ba8ab +config: 61560732a23437528f3470c755eb4c63 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/_static/js/fix-copy.js b/_static/js/fix-copy.js new file mode 100755 index 00000000..0999cc3e --- /dev/null +++ b/_static/js/fix-copy.js @@ -0,0 +1,18 @@ +/* Fix: Prevent "Copy code" button label from appearing in clipboard content. + * + * sphinxawesome_theme inserts a copy button inside
elements. When
+ * clipboard.js selects all children of the to copy, the button's
+ * sr-only text ("Copy code") is included in the selection. This listener
+ * intercepts the copy event and strips that trailing label from the data
+ * written to the clipboard.
+ */
+document.addEventListener('copy', function (e) {
+ if (!e.clipboardData) { return; }
+ var selection = window.getSelection();
+ if (!selection) { return; }
+ var text = selection.toString();
+ var clean = text.replace(/\nCopy code\s*$/, '');
+ if (clean === text) { return; }
+ e.clipboardData.setData('text/plain', clean);
+ e.preventDefault();
+}, true);
diff --git a/concepts/agents.html b/concepts/agents.html
index 06ff3e31..442593a4 100755
--- a/concepts/agents.html
+++ b/concepts/agents.html
@@ -277,5 +277,6 @@
+