Skip to content

Commit 90636aa

Browse files
Fix type replace regex to exclude already formatted namepaths
1 parent 1f7e1dd commit 90636aa

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*)(?<!https?:|module:|event:|external:)${key}([^A-Za-z].*?\}|\})`,
591591
'g',
592592
);
593593
replace(typeRegex);

0 commit comments

Comments
 (0)