Skip to content

Commit

Permalink
Merge pull request #67 from Daniel-Knights/fix-type-replace-regex
Browse files Browse the repository at this point in the history
Fix type replace regex
  • Loading branch information
ahocevar authored Oct 16, 2024
2 parents 1f7e1dd + a0e2d61 commit 2ccc16d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ exports.astNodeVisitor = {
replace(eventRegex);

const typeRegex = new RegExp(
`@(.*[{<|,(!?:]\\s*)${key}([^A-Za-z].*?\}|\})`,
`@(.*[{<|,(!?:]\\s*)(?<!module:|event:|external:)${key}([^A-Za-z].*?\}|\})`,
'g',
);
replace(typeRegex);
Expand Down

0 comments on commit 2ccc16d

Please sign in to comment.