From 939a06692a1237f18afd20624a9b6b33fd2f266d Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Sun, 21 Apr 2024 12:06:47 +0300 Subject: [PATCH] Tweak the copybutton settings to ignore prompts. I still don't really know why this isn't the default. Closes: #1246 --- docs/conf.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 23721315..4f8d9f15 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -123,19 +123,23 @@ def entire_domain(host): autosectionlabel_prefix_document = True +# -- intersphinx -- + +intersphinx_mapping = { + "python": ("https://docs.python.org/3", None), + "referencing": ("https://referencing.readthedocs.io/en/stable/", None), +} + # -- extlinks -- extlinks = { "ujs": ("https://json-schema.org/understanding-json-schema%s", None), } extlinks_detect_hardcoded_links = True +# -- sphinx-copybutton -- -# -- intersphinx -- - -intersphinx_mapping = { - "python": ("https://docs.python.org/3", None), - "referencing": ("https://referencing.readthedocs.io/en/stable/", None), -} +copybutton_prompt_text = r">>> |\.\.\. |\$" +copybutton_prompt_is_regexp = True # -- sphinxcontrib-spelling --