Skip to content

Commit

Permalink
Update apps/docs-snippets2/scripts/wrap-snippets.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Torres-ssf authored Oct 22, 2024
1 parent d70b34b commit d8e7b19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/docs-snippets2/scripts/wrap-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const wrapSnippet = (filepath: string) => {
/*
Removes .env file import
*/
const envImportReg = /\nimport.+\{([^}]+)\}.+from\s+['"](\.\.\/)+env['"];/gm;
const envImportReg = /\nimport\s*\{([^}]+)\}\s*from\s*['"](\.\.\/)+env['"];/gm;
if (envImportReg.test(imports)) {
const allImports = imports.match(envImportReg)?.[0];
const envImport = `import ${allImports?.split('import ').pop()}`;
Expand Down

0 comments on commit d8e7b19

Please sign in to comment.