From dd7c203b81100513a0ff1fe653720650bcaa44d9 Mon Sep 17 00:00:00 2001 From: Axel Donath Date: Fri, 31 Jan 2025 11:58:51 -0500 Subject: [PATCH] Adjust conf.py to remove prompt from sphinx copybutton --- docs/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index fd0065696..1f3e35911 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -307,6 +307,10 @@ epub_exclude_files = ['search.html'] # -- Extension configuration ------------------------------------------------- +# Define prompt text pattern to be removed for copybutton +# See https://sphinx-copybutton.readthedocs.io/en/latest/use.html#using-regexp-prompt-identifiers +copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: " +copybutton_prompt_is_regexp = True # Tell sphinx autodoc how to render type aliases. autodoc_typehints = "description"