Skip to content

Commit 10759ae

Browse files
authored
Fix incorrect regex condition. (#25)
1 parent 4937d83 commit 10759ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tekkon/Shared.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public static string RestoreToneOneInZhuyinKey(string target,
104104
/// <returns>轉換結果。</returns>
105105
public static string CnvHanyuPinyinToPhona(string target,
106106
string newToneOne = "") {
107-
if (target.Contains('_') || Regex.IsMatch(target, @".*[^A-Za-z0-9].*"))
107+
if (target.Contains('_') || !Regex.IsMatch(target, @".*[^A-Za-z0-9].*"))
108108
return target;
109109
foreach (string key in MapHanyuPinyin.Keys.OrderBy(x => x.Length)
110110
.Reverse()) {

0 commit comments

Comments
 (0)