Skip to content

Commit

Permalink
fix regex for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
meorphis committed May 7, 2024
1 parent ecf8a27 commit 446b796
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/updaters/python/python-readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export class PythonReadme extends DefaultUpdater {
if (this.version.preRelease) {
// it's a pre-release, so add the pre-release flag if it's missing
return content.replace(
/^# install from PyPI\n^pip install (\S+)$/gm,
/^# install from PyPI\r?\n^pip install (\S+)$/gm,
'# install from PyPI\npip install --pre $1'
);
} else {
// it's not a pre-release, so remove the pre-release flag if it's present
return content.replace(
/^# install from PyPI\n^pip install --pre (\S+)$/gm,
/^# install from PyPI\r?\n^pip install --pre (\S+)$/gm,
'# install from PyPI\npip install $1'
);
}
Expand Down

0 comments on commit 446b796

Please sign in to comment.