Skip to content

Commit 939a066

Browse files
committed
Tweak the copybutton settings to ignore prompts.
I still don't really know why this isn't the default. Closes: #1246
1 parent a75362c commit 939a066

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

docs/conf.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,23 @@ def entire_domain(host):
123123

124124
autosectionlabel_prefix_document = True
125125

126+
# -- intersphinx --
127+
128+
intersphinx_mapping = {
129+
"python": ("https://docs.python.org/3", None),
130+
"referencing": ("https://referencing.readthedocs.io/en/stable/", None),
131+
}
132+
126133
# -- extlinks --
127134

128135
extlinks = {
129136
"ujs": ("https://json-schema.org/understanding-json-schema%s", None),
130137
}
131138
extlinks_detect_hardcoded_links = True
139+
# -- sphinx-copybutton --
132140

133-
# -- intersphinx --
134-
135-
intersphinx_mapping = {
136-
"python": ("https://docs.python.org/3", None),
137-
"referencing": ("https://referencing.readthedocs.io/en/stable/", None),
138-
}
141+
copybutton_prompt_text = r">>> |\.\.\. |\$"
142+
copybutton_prompt_is_regexp = True
139143

140144
# -- sphinxcontrib-spelling --
141145

0 commit comments

Comments
 (0)