Skip to content

Commit

Permalink
only match on full type name (#5845)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner-reits committed Jun 24, 2024
1 parent f9f1452 commit 7ac5aaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/types/stencil-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const updateTypeName = (currentTypeName: string, typeAlias: d.TypesMemberNameDat
* those in string literals. We do not check for a starting quote (" | ' | `) here as some browsers do not support
* negative lookbehind. This works "well enough" until STENCIL-419 is completed.
*/
const typeNameRegex = new RegExp(`${typeAlias.localName}\\b${endingStrChar}`, 'g');
const typeNameRegex = new RegExp(`\\b${typeAlias.localName}\\b${endingStrChar}`, 'g');
return currentTypeName.replace(typeNameRegex, typeAlias.importName);
};

Expand Down

0 comments on commit 7ac5aaf

Please sign in to comment.