Skip to content

Commit bf42e4b

Browse files
committed
Configured copybutton to strip Python REPL prompts and output when copying
1 parent bb10b27 commit bf42e4b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/source/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,9 @@
461461
# If false, no module index is generated.
462462
# latex_use_modindex = True
463463

464+
# Configure copybutton to strip Python REPL prompts and output when copying
465+
copybutton_prompt_text = r">>> |\.\.\.:|In \[\d+\]:?|Out\[\d+\]:?"
466+
copybutton_prompt_is_regexp = True
464467

465468
if include_api:
466469
intersphinx_mapping = {

0 commit comments

Comments
 (0)