From 25f61dc88f901e30b4a9e352ed99ed4bef089cf4 Mon Sep 17 00:00:00 2001 From: Arthur Vasconcelos Date: Sat, 8 Jun 2024 14:43:54 +0200 Subject: [PATCH] Fixed #34846 -- Added copy button to code snippets on the documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexander Lötvall Co-authored-by: Saarthak Maini <94912101+SaarthakMaini@users.noreply.github.com> Co-authored-by: Venkata Bhaskar <111889155+VenkataBhaskar@users.noreply.github.com> --- docs/conf.py | 4 ++++ docs/requirements.txt | 1 + 2 files changed, 5 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index c36a9a2022..b8882dda97 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -47,8 +47,12 @@ extensions = [ "sphinx.ext.intersphinx", "sphinx.ext.autosectionlabel", "sphinx.ext.linkcode", + "sphinx_copybutton", ] +copybutton_prompt_text = r"\.\.\.\\\> |\$ " +copybutton_prompt_is_regexp = True + # AutosectionLabel settings. # Uses a :