diff --git a/__tests__/__fixtures__/project-openapi/README.markdown b/__tests__/__fixtures__/project-openapi/README.markdown new file mode 100644 index 0000000..3fd4432 --- /dev/null +++ b/__tests__/__fixtures__/project-openapi/README.markdown @@ -0,0 +1,3 @@ +This is a test README. + +It should not be picked up by `swagger-inline` and throw errors because it doesn't have any docblocks. diff --git a/src/index.js b/src/index.js index 181f1df..7024a81 100644 --- a/src/index.js +++ b/src/index.js @@ -134,7 +134,7 @@ function swaggerInline(globPatterns, providedOptions) { }); } catch (err) { // If the file that we failed to parse is a text file, let's just ignore it. - if (['.json', '.md', '.txt'].includes(path.extname(fileInfo.fileName))) { + if (['.json', '.md', '.markdown', '.txt'].includes(path.extname(fileInfo.fileName))) { return Promise.resolve(); } else if (/Cannot find language definition/.test(err.message)) { return Promise.resolve();