Skip to content

Commit

Permalink
Update script to include exampleKey when filtering files
Browse files Browse the repository at this point in the history
  • Loading branch information
omckeon committed Nov 17, 2024
1 parent 9a561c9 commit ac1cec7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/usage-example-page-generation.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ categories.forEach((categoryKey) => {
let importTitle = exampleKey.replaceAll("-", "_");
let functionTag = "";
languageOrder.forEach((lang) => {
const languageFiles = codeFiles.filter(file => file.endsWith(languageFileExtensions[lang]));
const languageFiles = codeFiles.filter(file => file.startsWith(exampleKey)).filter(file => file.endsWith(languageFileExtensions[lang]));
let codeFilePath = categoryPath + "/" + functionKey + "/" + exampleTxtKey.replaceAll(".txt", languageFileExtensions[lang]);

// import code if available
Expand Down

0 comments on commit ac1cec7

Please sign in to comment.