diff --git a/docs/website/tools/preprocess_docs.js b/docs/website/tools/preprocess_docs.js index ae04fa2b73..edc3d5c021 100644 --- a/docs/website/tools/preprocess_docs.js +++ b/docs/website/tools/preprocess_docs.js @@ -267,10 +267,8 @@ function syncExamples() { const exampleName = exampleDir.split("/").slice(-1)[0]; // exclude some folders - for (const exclusion of EXAMPLES_EXCLUSIONS) { - if (exampleName.startsWith(exclusion)) { - continue; - } + if (EXAMPLES_EXCLUSIONS.some(ex => exampleName.startsWith(ex))) { + continue; } const exampleFile = `${EXAMPLES_SOURCE_DIR}${exampleName}/${exampleName}.py`;