Skip to content

Commit

Permalink
utils.ts: dont match parameters in constructor name check
Browse files Browse the repository at this point in the history
  • Loading branch information
cfal committed May 2, 2023
1 parent e194426 commit 778a48b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ export function isEntryAContructor(
} else if (line.includes("#[constructor]")) {
// Check if next line is contains entry type name
const nextLine = lines[index + 1];
if (nextLine && nextLine.includes(entryType.name)) {
const pattern = new RegExp(`\\bfn\\s+${entryType.name}\\b`);
if (nextLine && pattern.test(nextLine)) {
return true;
}
}
Expand Down

0 comments on commit 778a48b

Please sign in to comment.