Skip to content

Commit 6559118

Browse files
authoredJan 1, 2024
Avoid finding temp files like .readme.md.swp (#184)
1 parent c3c8ee3 commit 6559118

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/find-readme-file.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'node:path';
33

44
export default function findReadmeFile(directory) {
55
const readmeFile = fs.readdirSync(directory).find(filename => (
6-
/readme|readme\.md|readme\.markdown|readme.txt/i.test(filename)
6+
/^(readme|readme\.md|readme\.markdown|readme.txt)$/i.test(filename)
77
));
88

99
if (readmeFile) {

0 commit comments

Comments
 (0)
Please sign in to comment.