Skip to content

Commit fbfefff

Browse files
committed
add sphinx-toggleprompt
1 parent 94bfb28 commit fbfefff

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

doc/source/_static/css/pandas.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,8 @@ table {
5050
.card, .card img {
5151
background-color: var(--pst-color-background);
5252
}
53+
54+
/* Override some aspects of the sphinx-copybutton */
55+
button.copybtn {
56+
opacity: 1;
57+
}

doc/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"numpydoc",
5959
"sphinx_copybutton",
6060
"sphinx_design",
61+
"sphinx_toggleprompt",
6162
"sphinx.ext.autodoc",
6263
"sphinx.ext.autosummary",
6364
"sphinx.ext.coverage",
@@ -71,9 +72,8 @@
7172
"nbsphinx",
7273
]
7374

74-
# sphinx-copybutton configurations
75-
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.{3,}: | {5,8}: "
76-
copybutton_prompt_is_regexp = True
75+
# sphinx-toggleprompt configurations
76+
toggleprompt_offset_right = 35
7777

7878
exclude_patterns = [
7979
"**.ipynb_checkpoints",

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ dependencies:
9292
- sphinx
9393
- sphinx-design
9494
- sphinx-copybutton
95+
- sphinx-toggleprompt
9596
- types-python-dateutil
9697
- types-PyMySQL
9798
- types-pytz

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ pytest-cython
6767
sphinx
6868
sphinx-design
6969
sphinx-copybutton
70+
sphinx-toggleprompt
7071
types-python-dateutil
7172
types-PyMySQL
7273
types-pytz

0 commit comments

Comments
 (0)