Skip to content

Commit ff4c0c2

Browse files
tacaswellmeeseeksmachine
authored andcommitted
Backport PR matplotlib#22994: Docs: ignore >>> on code prompts on documentation prompts
1 parent 2e7af71 commit ff4c0c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
360360
# '**': ['localtoc.html', 'pagesource.html']
361361
}
362362

363+
# Copies only relevant code, not the '>>>' prompt
364+
copybutton_prompt_text = r'>>> |\.\.\. '
365+
copybutton_prompt_is_regexp = True
366+
363367
# If true, add an index to the HTML documents.
364368
html_use_index = False
365369

0 commit comments

Comments
 (0)