Skip to content

Commit

Permalink
fix: Improved RegEx to avoid false positives for " in texts
Browse files Browse the repository at this point in the history
  • Loading branch information
jwikman committed Feb 20, 2024
1 parent 55680c1 commit 055d6a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extension/src/XliffFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ export function refreshSelectedXlfFileFromGXlf(
transUnitsToRemoveCommentsInCode: Map<TransUnit, string>
): boolean {
const regex = new RegExp(
`(?<language>${threeLetterAbbreviationLanguageCode})="(?<translation>.*?)";?`
`(?<language>${threeLetterAbbreviationLanguageCode})="(?<translation>.*?)"(;|$)`
);
const matchResult = langTransUnit.developerNoteContent().match(regex);
if (matchResult) {
Expand Down

0 comments on commit 055d6a4

Please sign in to comment.