Skip to content

Commit 933c474

Browse files
docs: Add sphinx-copybutton support
* Add sphinx-copybutton v0.5.2+ to the 'docs' extra. * Enable sphinx-copybutton support in the Sphinx conf.py.
1 parent c555974 commit 933c474

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docs/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
'code_include.extension',
2828
'myst_parser',
2929
'sphinxcontrib.autodoc_pydantic',
30-
'sphinx_tabs.tabs'
30+
'sphinx_tabs.tabs',
31+
'sphinx_copybutton',
3132
]
3233

3334
templates_path = ['_templates']
@@ -50,3 +51,8 @@
5051

5152
html_theme = 'furo'
5253
html_static_path = ['_static']
54+
55+
# sphinx-copybutton configuration
56+
copybutton_prompt_text = r">>> |\.\.\. |\$ "
57+
copybutton_prompt_is_regexp = True
58+
copybutton_here_doc_delimiter = "EOF"

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ docs = [
8686
"myst-parser>=3.0.1",
8787
"func-adl-servicex-xaodr22",
8888
"autodoc-pydantic==2.2.0",
89-
"sphinx-tabs>=3.4.5"
89+
"sphinx-tabs>=3.4.5",
90+
"sphinx-copybutton>=0.5.2",
9091
]
9192
develop = [
9293
"servicex[test,docs]",

0 commit comments

Comments
 (0)