8000 Merge pull request #22994 from dmatos2012/modify-sphinx-copy-extension · matplotlib/matplotlib@82cf624 · GitHub
[go: up one dir, main page]

Skip to content

Commit 82cf624

Browse files
authored
Merge pull request #22994 from dmatos2012/modify-sphinx-copy-extension
DOC: ignore >>> on code prompts on documentation prompts with copy button
2 parents 9913c81 + 87a1fb5 commit 82cf624

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
@@ -366,6 +366,10 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
366366
# '**': ['localtoc.html', 'pagesource.html']
367367
}
368368

369+
# Copies only relevant code, not the '>>>' prompt
370+
copybutton_prompt_text = r'>>> |\.\.\. '
371+
copybutton_prompt_is_regexp = True
372+
369373
# If true, add an index to the HTML documents.
370374
html_use_index = False
371375

0 commit comments

Comments
 (0)
0