Skip to content

Commit

Permalink
fix: make string matcher more precise
Browse files Browse the repository at this point in the history
  • Loading branch information
wkillerud committed Jan 22, 2024
1 parent 19d7255 commit 8ffdfa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parsers.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const standardImport = (flags = 'sgm') => new RegExp('(import)\\s*(.+?)\\s*(from)\\s*[\'"](.+?)[\'"]', flags);
const standardImport = (flags = 'sgm') => new RegExp('(import)\\s*(.+?)\\s*(from)\\s*[\'"]([\\w@\\-\\./]+?)[\'"]', flags);
module.exports.standardImport = standardImport;

const dynamicImport = (flags = 'gm') => new RegExp('(import)[(][\'"](.+?)[\'"][)]', flags);
Expand Down

0 comments on commit 8ffdfa6

Please sign in to comment.