From: Mike Bayer Date: Mon, 14 Mar 2022 19:33:15 +0000 (-0400) Subject: add sphinx_copybutton X-Git-Tag: rel_1_7_7~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f61c47abaebb06228f31d9992b1423fd54cdb2e;p=thirdparty%2Fsqlalchemy%2Falembic.git add sphinx_copybutton Change-Id: I14471e98a876982b4fcfdfab35c3150ab0b18bde --- diff --git a/docs/build/conf.py b/docs/build/conf.py index c39e5b22..dd984622 100644 --- a/docs/build/conf.py +++ b/docs/build/conf.py @@ -38,8 +38,15 @@ extensions = [ "sphinx.ext.intersphinx", "changelog", "sphinx_paramlinks", + "sphinx_copybutton", ] +copybutton_prompt_text = ( + r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: " +) +copybutton_prompt_is_regexp = True + + # tags to sort on inside of sections changelog_sections = [ "changed", diff --git a/docs/build/requirements.txt b/docs/build/requirements.txt index 81db1119..2d7081c0 100644 --- a/docs/build/requirements.txt +++ b/docs/build/requirements.txt @@ -5,4 +5,5 @@ python-dateutil # because there's a dependency in pyfiles.py Mako importlib-metadata;python_version<"3.8" -importlib-resources;python_version<"3.9" \ No newline at end of file +importlib-resources;python_version<"3.9" +sphinx_copybutton