Skip to content

Commit 0d5b238

Browse files
authored
Merge pull request #8 from bastianeicher/patch-1
Add support for colons inside placeholders
2 parents be1a0a5 + 8a73ee9 commit 0d5b238

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Main/Translation/DeepLTranslator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ async Task<IImmutableSet<CultureInfo>> Inner()
5959
}
6060

6161
private static readonly Regex HotkeyPrefixRegex = new("&([a-zA-Z0-9])", RegexOptions.Compiled);
62-
private static readonly Regex PlaceholderRegex = new("{([a-zA-Z0-9]+)}", RegexOptions.Compiled);
63-
private static readonly Regex PlaceholderReverseRegex = new("<placeholder>([a-zA-Z0-9]+)</placeholder>", RegexOptions.Compiled);
62+
private static readonly Regex PlaceholderRegex = new("{([a-zA-Z0-9:]+)}", RegexOptions.Compiled);
63+
private static readonly Regex PlaceholderReverseRegex = new("<placeholder>([a-zA-Z0-9:]+)</placeholder>", RegexOptions.Compiled);
6464

6565
public async Task<string[]> Translate(
6666
string[] sourceTexts,
@@ -101,4 +101,4 @@ public async Task<string[]> Translate(
101101
throw new ResXTranslatorTranslationFailedException(exception);
102102
}
103103
}
104-
}
104+
}

0 commit comments

Comments
 (0)