diff options
author | Nikhil Ladha <nikhilladha1999@gmail.com> | 2023-03-27 20:53:02 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-27 16:23:02 +0100 |
commit | 5c61b2a52c3bd74250d1ecc6a2a7b13c20e7286f (patch) | |
tree | a9c94c1d139ae60f86fd79ad617e89a512cb3b4f | |
parent | 20d270d3e27c3db65c4b5371b82e1022b792adff (diff) | |
download | pip-5c61b2a52c3bd74250d1ecc6a2a7b13c20e7286f.tar.gz |
Configure sphinx-copybutton to strip prompts (#11702)
-rw-r--r-- | docs/html/conf.py | 6 | ||||
-rw-r--r-- | news/11702.trivial.rst | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/html/conf.py b/docs/html/conf.py index aae1364b8..683ea7b87 100644 --- a/docs/html/conf.py +++ b/docs/html/conf.py @@ -131,3 +131,9 @@ def determine_man_pages() -> List[Tuple[str, str, str, str, int]]: man_pages = determine_man_pages() + +# -- Options for sphinx_copybutton ---------------------------------------------------- + +copybutton_prompt_text = r"\$ | C\:\> " +copybutton_prompt_is_regexp = True +copybutton_only_copy_prompt_lines = False diff --git a/news/11702.trivial.rst b/news/11702.trivial.rst new file mode 100644 index 000000000..d27e33d78 --- /dev/null +++ b/news/11702.trivial.rst @@ -0,0 +1,2 @@ +Strip command line prompts like "$" and "C:>" from the actual command +being copied using the copybutton. |