Skip to content

Commit 42642b5

Browse files
authored
Fix copying of code examples in docs. (#20)
1 parent 5098fbe commit 42642b5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/changes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ all releases are available on `Anaconda.org <https://anaconda.org/pytask/pytask>
1414
- :gh:`17` changes the interface to subcommands, adds ``"-c/--config"`` option to pass a
1515
path to a configuration file and adds ``pytask clean``, a command to clean your
1616
project.
17+
- :gh:`20` fixes copying code examples in the documentation.
1718

1819

1920
0.0.5 - 2020-08-12

docs/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@
5151

5252
# -- Extensions configuration ----------------------------------------------------------
5353

54-
# Configuration for autodoc
54+
# Configuration for autodoc.
5555
autosummary_generate = True
5656
add_module_names = False
5757
autodoc_mock_imports = ["attr", "click", "networkx", "pluggy", "pony"]
5858

59-
copybutton_prompt_text = r"\\$ |>>> "
59+
# Remove prefixed $ for bash, >>> for Python prompts, and In [1]: for IPython prompts.
60+
copybutton_prompt_text = r"\$ |>>> |In \[\d\]: "
6061
copybutton_prompt_is_regexp = True
6162

6263
extlinks = {

0 commit comments

Comments
 (0)