Skip to content

Commit

Permalink
More robust spacing parsing in helper
Browse files Browse the repository at this point in the history
  • Loading branch information
sxxov committed Oct 29, 2023
1 parent 1805495 commit 3d1996e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default ({ enabled = true } = {}) => {
transform(src: string, _: string) {
let curr: RegExpExecArray | null = null;
const regex =
/import +{(?<content>(?:[^}{])*)} +from +["'](?<maic>maic)(?:\/(?<variant>\w+))?["'];?/dg;
/import\s+{(?<content>(?:[^}{])*)}\s+from\s+["'](?<maic>maic)(?:\/(?<variant>\w+))?["'];?/dg;
let dist = '';
let prevIndex = 0;

Expand Down

0 comments on commit 3d1996e

Please sign in to comment.