Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Nov 2, 2024
1 parent 78b2f9c commit 072f652
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions JL.Core/Dicts/CustomWordDict/CustomWordRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public string BuildFormattedDefinition(DictOptions options)

StringBuilder defResult = new();

string separator = newlines
? "\n"
: "; ";
char separator = newlines
? '\n'
: ';';

for (int i = 0; i < Definitions.Length; i++)
{
Expand Down
6 changes: 3 additions & 3 deletions JL.Core/Dicts/EPWING/Nazeka/EpwingNazekaRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public string BuildFormattedDefinition(DictOptions options)
return Definitions[0];
}

string separator = options is { NewlineBetweenDefinitions.Value: false }
? "; "
: "\n";
char separator = options is { NewlineBetweenDefinitions.Value: false }
? ';'
: '\n';

StringBuilder defResult = new();
for (int i = 0; i < Definitions.Length; i++)
Expand Down
6 changes: 3 additions & 3 deletions JL.Core/Dicts/EPWING/Yomichan/EpwingYomichanRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public string BuildFormattedDefinition(DictOptions options)
}

bool newlines = options.NewlineBetweenDefinitions!.Value;
string separator = newlines
? "\n"
: "; ";
char separator = newlines
? '\n'
: ';';

StringBuilder defResult = new();
for (int i = 0; i < Definitions.Length; i++)
Expand Down
4 changes: 2 additions & 2 deletions JL.Core/Dicts/JMdict/JmdictRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public string BuildFormattedDefinition(DictOptions options)
{
bool newlines = options.NewlineBetweenDefinitions!.Value;

string separator = newlines ? "\n" : "; ";
char separator = newlines ? '\n' : ';';

StringBuilder defResult = new();

Expand Down Expand Up @@ -230,7 +230,7 @@ public string BuildFormattedDefinition(DictOptions options)

if (i + 1 != Definitions.Length)
{
_ = defResult.Replace(" ", separator, defResult.Length - 1, 1);
_ = defResult.Replace(' ', separator, defResult.Length - 1, 1);
}
}

Expand Down
6 changes: 3 additions & 3 deletions JL.Core/Dicts/JMnedict/JmnedictRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public string BuildFormattedDefinition(DictOptions options)

bool newlines = options.NewlineBetweenDefinitions!.Value;

string separator = newlines
? "\n"
: "; ";
char separator = newlines
? '\n'
: ';';

StringBuilder defResult = new();
for (int i = 0; i < Definitions.Length; i++)
Expand Down
6 changes: 3 additions & 3 deletions JL.Core/Dicts/KanjiDict/YomichanKanjiRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ public YomichanKanjiRecord(List<JsonElement> jsonElement)
}

StringBuilder defResult = new();
string separator = options.NewlineBetweenDefinitions!.Value
? "\n"
: "; ";
char separator = options.NewlineBetweenDefinitions!.Value
? '\n'
: ';';

for (int i = 0; i < Definitions.Length; i++)
{
Expand Down

0 comments on commit 072f652

Please sign in to comment.