Skip to content

Commit dcf1b18

Browse files
committed
Fix issue found by CodeQL - Inefficient regular expression
1 parent d152f05 commit dcf1b18

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ def fix_doc(txt):
88
"""
99
Fixes documentation so that it's readable in pypi website.
1010
"""
11-
return re.sub(r"\.\. PYPI-BEGIN([\r\n]|.)*?PYPI-END", "", txt, flags=re.DOTALL)
11+
return re.sub(
12+
r"\.\. PYPI-BEGIN([\r\n]|[^\r\n])*?PYPI-END", "", txt, flags=re.DOTALL
13+
)
1214

1315

1416
with open("README.rst", encoding="utf8") as fileR:

0 commit comments

Comments
 (0)