Skip to content

Commit 32875f9

Browse files
committed
🐛 Correct creation of source text (and .. )
1 parent 5d92921 commit 32875f9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/dev/ebullient/convert/tools/dnd5e/Tools5eSources.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,11 @@ protected String findSourceText(IndexType type, JsonNode jsonElement) {
360360
if (srdText.isBlank() && basicRulesText.isBlank()) {
361361
return sourceText;
362362
}
363-
String srdBasic = "Available in " + srdText + (srdText.isEmpty() ? "" : " and ") + basicRulesText;
363+
String srdBasic = "Available in " + srdText;
364+
if (!srdText.isEmpty() && !basicRulesText.isEmpty()) {
365+
srdBasic += " and ";
366+
}
367+
srdBasic += basicRulesText;
364368
return sourceText.isEmpty()
365369
? srdBasic
366370
: sourceText + ". " + srdBasic;

0 commit comments

Comments
 (0)