Skip to content

Commit

Permalink
pin sphinx-copybutton and change config
Browse files Browse the repository at this point in the history
sphinx-copybutton introduced a new feature
in 0.5.1 which includes a default configuration
that breaks the regexp prompt matching scheme.

set copybutton_exclude to not include ".gp" as that's the class
where we exactly look for the prompts we are matching.

pin sphinx-copybutton at 0.5.1 to avoid future problems.

Change-Id: Ie03bc27a9190e71b63fc68b484f23e53b8cb72dc
References: executablebooks/sphinx-copybutton#185
  • Loading branch information
zzzeek committed Feb 9, 2023
1 parent 4fb3681 commit 679555c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/build/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
)
copybutton_prompt_is_regexp = True
# workaround
# https://sphinx-copybutton-exclude-issue.readthedocs.io/en/v0.5.1-go/
# https://github.com/executablebooks/sphinx-copybutton/issues/185
copybutton_exclude = ".linenos"


# tags to sort on inside of sections
Expand Down
2 changes: 1 addition & 1 deletion docs/build/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ python-dateutil
Mako
importlib-metadata;python_version<"3.8"
importlib-resources;python_version<"3.9"
sphinx_copybutton
sphinx_copybutton==0.5.1

0 comments on commit 679555c

Please sign in to comment.