Skip to content

Commit e517c41

Browse files
committed
fix: regex for fixing requirements bug
1 parent 14af0b8 commit e517c41

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/github.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,8 @@ class Github {
449449
}
450450
if (line.trim().startsWith('# -r ')) {
451451
// Replace everything before 'requirements/' with '# -r requirements/'
452-
const fixedLine = line.replace(/#\s+-r\s+.*?requirements\//, '# -r requirements/');
452+
const fixedLine = line.replace(/#\s+-r\s+\S*requirements\//, '# -r requirements/');
453+
453454
if (fixedLine !== line) {
454455
needsUpdate = true;
455456
return fixedLine;

0 commit comments

Comments
 (0)