mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-24 00:20:24 +00:00
Message fixes
This commit is contained in:
parent
8602882b94
commit
9ce8b2715c
1 changed files with 12 additions and 6 deletions
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue