Skip to content

Commit 2ccc16d

Browse files
authored
Merge pull request #67 from Daniel-Knights/fix-type-replace-regex
Fix type replace regex
2 parents 1f7e1dd + a0e2d61 commit 2ccc16d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ exports.astNodeVisitor = {
587587
replace(eventRegex);
588588

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

0 commit comments

Comments
 (0)