Skip to content

Commit

Permalink
rename variable posMatches to matches to follow naming convention…
Browse files Browse the repository at this point in the history
… in other areas of module
  • Loading branch information
noelforte committed Dec 3, 2024
1 parent b9a0f23 commit 56200ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ export function transformTemplateCode(
const annotation = code.split("\n")[loc.start.line - 1] + "\n" +
" ".repeat(loc.start.column) + "\x1b[31m^\x1b[0m";

const posMatches = [...code.slice(0, start).matchAll(/__pos = (\d+);/g)];
const pos = Number(posMatches.at(-1)?.[1]);
const matches = [...code.slice(0, start).matchAll(/__pos = (\d+);/g)];
const pos = Number(matches.at(-1)?.[1]);

throw new TransformError(
`Error transforming template function.\n${message} while transforming:\n\n${annotation}`,
Expand Down

0 comments on commit 56200ac

Please sign in to comment.