@@ -26,11 +26,20 @@ And here's a code block, note the copy button to the right!
26
26
27
27
copy me!
28
28
29
- By default, ``sphinx-copybutton `` will remove Python prompts from
30
- each line that begins with them. If it finds lines that start with the
31
- prompt text, all *other * lines will not be copied.
32
- For example, try copying the text
33
- below:
29
+
30
+ If the code block overlaps to the right of the text area, you can just click
31
+ the button to get the whole thing.
32
+
33
+ .. code-block :: bash
34
+
35
+ 123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789
36
+
37
+ You can configure ``sphinx-copybutton `` to detect *input prompts * in code
38
+ cells, and then both remove these prompts before copying, as well as skip
39
+ lines that *don't * start with prompts (in case they are output lines).
40
+
41
+ For example, this site has been configured to strip Python prompts (">>> ").
42
+ Try copy-pasting the code block below.
34
43
35
44
.. code-block :: python
36
45
@@ -42,16 +51,6 @@ below:
42
51
>> > print (b)
43
52
wow
44
53
45
- The text that ``sphinx-copybutton `` uses can be configured as well. See
46
- :ref: `configure_copy_text ` for more information.
47
-
48
- If the code block overlaps to the right of the text area, you can just click
49
- the button to get the whole thing.
50
-
51
- .. code-block :: bash
52
-
53
- 123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789
54
-
55
54
Installation
56
55
============
57
56
0 commit comments