Message fixes

This commit is contained in:
crschnick 2023-08-26 06:44:36 +00:00
parent 8602882b94
commit 9ce8b2715c

View file

@ -23,12 +23,18 @@ public interface MessageFormatter {
}
static MessageFormatter explanation(String explanation) {
return (message) -> """
%s
```
%s
```
""".formatted(explanation, message);
return (message) -> {
if (message.isBlank()) {
return explanation;
}
return """
%s
```
%s
```
""".formatted(explanation, message);
};
}