Skip to content

Commit

Permalink
[test] Support more markdown file extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-gromeyer committed Nov 25, 2023
1 parent 346fd6c commit 73f783e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,13 @@ int main(int argc, const char **argv) {
// List to store all markdown files in this dir
vector<string> files;

static vector<string> markdownExtensions = {".md", ".markdown", ".mkd"};

// Find the files
for (const auto &p : fs::recursive_directory_iterator(DIR)) {
if (p.path().extension() == ".md" && p.path().parent_path() == DIR)
if (std::find(markdownExtensions.begin(), markdownExtensions.end(),
p.path().extension()) != markdownExtensions.end() &&
p.path().parent_path() == DIR)
files.emplace_back(p.path().string());
}

Expand Down

0 comments on commit 73f783e

Please sign in to comment.