Skip to content

Commit

Permalink
chore: move ct func gen up
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Ambas committed Apr 5, 2024
1 parent a8d60d3 commit 46d95d3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const parser = (

const text = source.getText();
const calls = text.match(/ct\(['"][\w.]+['"]\)/g) ?? [];
const ct = get(tokens);
let newText = text;

for (const call of calls) {
Expand All @@ -29,8 +30,6 @@ export const parser = (
?.toString()
.replace(/['"]/g, '');
if (!path) continue;

const ct = get(tokens);
newText = newText.replace(call, ct(path));
}

Expand Down

0 comments on commit 46d95d3

Please sign in to comment.