diff --git a/docs/source/utils/notebook.py b/docs/source/utils/notebook.py index 4087339e5..bb51ca16a 100644 --- a/docs/source/utils/notebook.py +++ b/docs/source/utils/notebook.py @@ -54,7 +54,7 @@ class InstallationCell(ReplacePattern): Uncomment `# %pip install {}`, add a "quiet" flag, add a comment explaining the cell. """ - pattern: ClassVar[re.Pattern] = re.compile("\n# %pip install (.*)( # noqa: E501)?\n") + pattern: ClassVar[re.Pattern] = re.compile("\n# %pip install (.*?)([ ]*# noqa: E501)?\n") @staticmethod def replace_versions(cmd: str):