From b2d62fe8ee9408607b866b675dfca5849eeb8d44 Mon Sep 17 00:00:00 2001 From: Shardul D Date: Tue, 12 May 2026 13:49:14 +0530 Subject: [PATCH] added copy button fix --- docs/conf.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 0c6abdd9..c8c8685a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -299,6 +299,15 @@ mathjax_path = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js' +# Configure sphinx-copybutton (auto-enabled by canonical_sphinx) to strip +# the "$ " shell prompt from copied content. In code blocks that contain +# prompts, only the prompted lines (commands) are copied; output lines are +# skipped. Code blocks without any prompts (e.g. JSON output) are unaffected +# and copy verbatim. +copybutton_prompt_text = r"\$ " +copybutton_prompt_is_regexp = True +copybutton_line_continuation_character = "\\" + # Excludes files or directories from processing exclude_patterns = [