Skip to content

Commit

Permalink
Always load all MD files to check for images (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymcmackin authored Jan 7, 2025
1 parent 626489f commit 6e8d294
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/images.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ const getImagesInAst = (ast, /*filePath*/) => {

// Get a list of images used in all files
const getAllUsedImages = async () => {
const imagesUsedInDocs = await filePaths.reduce(async (imageListPromise, filePath) => {
// Get all files, not files that may be limited by argv.filesToCheck
const allMDFiles = await glob(docsFolder + '/**/*.{md,mdx}');
const imagesUsedInDocs = await allMDFiles.reduce(async (imageListPromise, filePath) => {
const imageList = await imageListPromise;
const ast = await getAst(filePath);
const imagesInAst = getImagesInAst(ast, filePath);
Expand Down

0 comments on commit 6e8d294

Please sign in to comment.