Skip to content

Commit 7a23593

Browse files
committed
configure copybutton
1 parent 681c8dd commit 7a23593

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/source/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858

5959
nb_execution_mode = "off"
6060

61+
# configure copy button to avoid copying sphinx or console characters
62+
copybutton_exclude = ".linenos, .gp"
63+
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
64+
copybutton_prompt_is_regexp = True
65+
6166
source_suffix = {
6267
".rst": "restructuredtext",
6368
".ipynb": "myst-nb",

0 commit comments

Comments
 (0)