Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Sep 14, 2024
1 parent cd1ec8c commit 89c2b19
Showing 1 changed file with 28 additions and 17 deletions.
45 changes: 28 additions & 17 deletions JL.Core/Dicts/CustomWordDict/CustomWordRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,37 @@ public CustomWordRecord(string primarySpelling, string[]? alternativeSpellings,

public string BuildFormattedDefinition(DictOptions options)
{
string tempWordClass;
if (WordClasses.Contains("adj-i"))
string? tempWordClass = null;
for (int i = 0; i < WordClasses.Length; i++)
{
tempWordClass = "adjective";
}
else if (WordClasses.Contains("noun"))
{
tempWordClass = "noun";
}
else if (WordClasses.Contains("other"))
{
tempWordClass = "other";
}
else if (HasUserDefinedWordClass)
{
tempWordClass = string.Join(", ", WordClasses);
string wordClass = WordClasses[i];
if (wordClass is "adj-i")
{
tempWordClass = "adjective";
break;
}
else if (wordClass is "noun")
{
tempWordClass = "noun";
break;
}
else if (wordClass is "other")
{
tempWordClass = "other";
break;
}
}
else

if (tempWordClass is null)
{
tempWordClass = "verb";
if (HasUserDefinedWordClass)
{
tempWordClass = string.Join(", ", WordClasses);
}
else
{
tempWordClass = "verb";
}
}

if (Definitions.Length is 1)
Expand Down

0 comments on commit 89c2b19

Please sign in to comment.