Skip to content

Commit

Permalink
Fix issue found by CodeQL - Inefficient regular expression
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-majlis committed Feb 21, 2024
1 parent d152f05 commit dcf1b18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ def fix_doc(txt):
"""
Fixes documentation so that it's readable in pypi website.
"""
return re.sub(r"\.\. PYPI-BEGIN([\r\n]|.)*?PYPI-END", "", txt, flags=re.DOTALL)
return re.sub(
r"\.\. PYPI-BEGIN([\r\n]|[^\r\n])*?PYPI-END", "", txt, flags=re.DOTALL
)


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

0 comments on commit dcf1b18

Please sign in to comment.