Skip to content

Commit

Permalink
Adjust regex to accommodating leading path prefixes (fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukiffer committed Feb 20, 2023
1 parent c7b01e4 commit a15c9ac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function main() {
console.log(filePath, fileName, fileContent);

const fileOptions = {
filePath: filePath.replace(new RegExp(`^${ basePath }/`), ''),
filePath: filePath.replace(new RegExp(`^\\.\\/?${ basePath }\\/`), ''),
fileName,
fileContent
};
Expand Down

0 comments on commit a15c9ac

Please sign in to comment.