From 39f24dd3dbbe5e5c7b0ef449f4e93d1daa84da05 Mon Sep 17 00:00:00 2001 From: Tomas Roun Date: Tue, 29 Apr 2025 19:36:49 +0200 Subject: [PATCH] Fix copy button with multiple tracebacks --- python_docs_theme/static/copybutton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_docs_theme/static/copybutton.js b/python_docs_theme/static/copybutton.js index 9df468e..de071f4 100644 --- a/python_docs_theme/static/copybutton.js +++ b/python_docs_theme/static/copybutton.js @@ -8,7 +8,7 @@ function getCopyableText(rootElement) { for (const el of tracebacks) { while ( el.nextSibling && - (el.nextSibling.nodeType !== Node.DOCUMENT_NODE || + (el.nextSibling.nodeType !== Node.ELEMENT_NODE || !el.nextSibling.matches(".gp, .go")) ) { el.nextSibling.remove()