diff --git a/src/helpers/readProblemMarkdownFrontMatter.ts b/src/helpers/readProblemMarkdownFrontMatter.ts index 61b2f12..9a73ece 100644 --- a/src/helpers/readProblemMarkdownFrontMatter.ts +++ b/src/helpers/readProblemMarkdownFrontMatter.ts @@ -9,7 +9,7 @@ import { problemMarkdownFrontMatterSchema } from '../types/problem.js'; export async function readProblemMarkdownFrontMatter(problemDir: string): Promise { for (const dirent of await fs.promises.readdir(problemDir, { withFileTypes: true })) { if (!dirent.isFile()) continue; - if (!dirent.name.endsWith('.problem.md')) continue; + if (!(dirent.name === 'problem.md' || dirent.name.endsWith('.problem.md'))) continue; const markdown = await fs.promises.readFile(path.join(dirent.parentPath, dirent.name), 'utf8');