Skip to content

Commit

Permalink
fix for filenames with a .
Browse files Browse the repository at this point in the history
  • Loading branch information
sdgilley committed Mar 26, 2024
1 parent a86e5bc commit fd4a071
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ <h2>Find the workflow and file for a code snippet</h2>
const branch = userInput.split('/')[0].trim();
let file = userInput.replace(`${branch}/`, '').trim();
let wf = file.replace(/\//g, '-');
console.log(wf);
// console.log(wf);
wf = wf.replace('sdk-python', 'sdk');
const wfname = wf.split('.')[0];
// const wfname = wf.split('.')[0];
let fileParts = wf.split('.');
fileParts.pop(); // Remove the last element of the array
let wfname = fileParts.join('.');
// console.log(wfname);
const wfLink = `https://github.com/Azure/azureml-examples/actions/workflows/${wfname}.yml`;
const ghLink = `https://github.com/Azure/azureml-examples/blob/${branch}/${file}`;

Expand Down

0 comments on commit fd4a071

Please sign in to comment.