Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
docs: add the copybutton extension to sphinx
[simgrid.git] / docs / source / conf.py
index 966f3fa..ee7c971 100644 (file)
@@ -54,6 +54,7 @@ extensions = [
     'sphinx.ext.intersphinx',
     'sphinx.ext.autosummary',
     'sphinx_tabs.tabs',
+    'sphinx_copybutton',
     'javasphinx',
     'showfile',
 ]
@@ -64,6 +65,10 @@ todo_include_todos = True
 breathe_projects = {'simgrid': '../build/xml'}
 breathe_default_project = "simgrid"
 
+# Setup the copybutton extension
+copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
+copybutton_prompt_is_regexp = True
+
 # Generate a warning for all a cross-reference (such as :func:`myfunc`) that cannot be found
 nitpicky = True
 nitpick_ignore = [