Skip to content

Commit

Permalink
🐛 Correct creation of source text (and .. )
Browse files Browse the repository at this point in the history
  • Loading branch information
ebullient committed Dec 18, 2024
1 parent 5d92921 commit 32875f9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,11 @@ protected String findSourceText(IndexType type, JsonNode jsonElement) {
if (srdText.isBlank() && basicRulesText.isBlank()) {
return sourceText;
}
String srdBasic = "Available in " + srdText + (srdText.isEmpty() ? "" : " and ") + basicRulesText;
String srdBasic = "Available in " + srdText;
if (!srdText.isEmpty() && !basicRulesText.isEmpty()) {
srdBasic += " and ";
}
srdBasic += basicRulesText;
return sourceText.isEmpty()
? srdBasic
: sourceText + ". " + srdBasic;
Expand Down

0 comments on commit 32875f9

Please sign in to comment.