Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Oct 22, 2023
1 parent c9ac4f5 commit 9b60cc7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions JL.Core/Dicts/EDICT/JMdict/JmdictRecordBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static void AddToDictionary(JmdictEntry entry, Dictionary<string, IList<I
definitionInfoList.Add(sense.SInf);
relatedTermList.Add(sense.XRefList.TrimStringListToStringArray());
antonymList.Add(sense.AntList.TrimStringListToStringArray());
loanwordSourceList.Add(sense.LSourceList.TrimListWithNullableElementsToArray());
loanwordSourceList.Add(sense.LSourceList.Count > 0 ? sense.LSourceList.ToArray() : null);
}
}

Expand Down Expand Up @@ -199,7 +199,7 @@ public static void AddToDictionary(JmdictEntry entry, Dictionary<string, IList<I
definitionInfoList.Add(sense.SInf);
relatedTermList.Add(sense.XRefList.TrimStringListToStringArray());
antonymList.Add(sense.AntList.TrimStringListToStringArray());
loanwordSourceList.Add(sense.LSourceList.TrimListWithNullableElementsToArray());
loanwordSourceList.Add(sense.LSourceList.Count > 0 ? sense.LSourceList.ToArray() : null);
}
}

Expand Down
2 changes: 1 addition & 1 deletion JL.Core/Utilities/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ internal static T[] RemoveAt<T>(this T[] source, int index)
return list.ToArray();
}

internal static T?[]? TrimListWithNullableElementsToArray<T>(this List<T?> list)
internal static T?[]? TrimListWithNullableElementsToArray<T>(this List<T?> list) where T : class
{
if (list.Count is 0 || list.All(static element => element is null))
{
Expand Down
1 change: 1 addition & 0 deletions JL.Core/Utilities/JapaneseUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public static class JapaneseUtils
// CJK Unified Ideographs Extension D (2B740–2B81F)
// CJK Unified Ideographs Extension E (2B820–2CEAF)
// CJK Unified Ideographs Extension F (2CEB0–2EBEF)
// CJK Unified Ideographs Extension I (2EBF0–2EE5F) is a Chinese-only range, so it's not included in the regex
// CJK Compatibility Ideographs Supplement (2F800–2FA1F)
// CJK Unified Ideographs Extension G (30000–3134F)
// CJK Unified Ideographs Extension H (31350–323AF)
Expand Down

0 comments on commit 9b60cc7

Please sign in to comment.