From 94bfb28b5c19465a979385d888d400df7bbfd574 Mon Sep 17 00:00:00 2001 From: Moritz Schreiber <68053396+mosc9575@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:56:42 +0200 Subject: [PATCH] add sphinx-copybutton configurations to exclude prompts --- doc/source/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index 77dd5d03d311c..329ebfb3bd89f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -71,6 +71,10 @@ "nbsphinx", ] +# sphinx-copybutton configurations +copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.{3,}: | {5,8}: " +copybutton_prompt_is_regexp = True + exclude_patterns = [ "**.ipynb_checkpoints", # to ensure that include files (partial pages) aren't built, exclude them