Skip to content

Commit ebe73c9

Browse files
author
Matthias Koeppe
committed
src/sage_docbuild/conf.py: Fix up copybutton config
1 parent d944070 commit ebe73c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sage_docbuild/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def set_intersphinx_mappings(app, config):
259259
# https://sphinx-copybutton.readthedocs.io/en/latest/use.html
260260
copybutton_prompt_text = r"sage: |[.][.][.][.]: |\$ "
261261
copybutton_prompt_is_regexp = True
262-
copybutton_exclude = '.linenos, .gp, .c' # exclude comments
262+
copybutton_exclude = '.linenos, .c1' # exclude single comments (in particular, # optional!)
263+
copybutton_only_copy_prompt_lines = True
263264

264265
# Options for HTML output
265266
# -----------------------

0 commit comments

Comments
 (0)