]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
pin sphinx-copybutton and change config
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 9 Feb 2023 17:11:31 +0000 (12:11 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 9 Feb 2023 17:13:25 +0000 (12:13 -0500)
sphinx-copybutton introduced a new feature
in 0.5.1 which includes a default configuration
that breaks the regexp prompt matching scheme.

set copybutton_exclude to not include ".gp" as that's the class
where we exactly look for the prompts we are matching.

pin sphinx-copybutton at 0.5.1 to avoid future problems.

Change-Id: Ie03bc27a9190e71b63fc68b484f23e53b8cb72dc
References: https://github.com/executablebooks/sphinx-copybutton/issues/185

docs/build/conf.py
docs/build/requirements.txt

index 3100db92b9245e4f1681ea487ba2b8ff6dadd523..ecd34da54bf44bfe0ba021340807d77656988410 100644 (file)
@@ -45,6 +45,10 @@ copybutton_prompt_text = (
     r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
 )
 copybutton_prompt_is_regexp = True
+# workaround
+# https://sphinx-copybutton-exclude-issue.readthedocs.io/en/v0.5.1-go/
+# https://github.com/executablebooks/sphinx-copybutton/issues/185
+copybutton_exclude = ".linenos"
 
 
 # tags to sort on inside of sections
index 2d7081c07de4a78c9dd803018d79ddff46239eea..6b2fd0e51a9a7a49d17619ce513d4b50c24e6710 100644 (file)
@@ -6,4 +6,4 @@ python-dateutil
 Mako
 importlib-metadata;python_version<"3.8"
 importlib-resources;python_version<"3.9"
-sphinx_copybutton
+sphinx_copybutton==0.5.1