fix markdown in the message breaking the log
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 1m6s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 1m6s
This commit is contained in:
parent
0cfccc70d8
commit
fdd36d4385
@ -58,6 +58,9 @@ public class LogFeature extends Feature {
|
|||||||
if (content == null) {
|
if (content == null) {
|
||||||
return "No content";
|
return "No content";
|
||||||
}
|
}
|
||||||
|
if (content.contains("`")) { // Workaround for markdown formatting
|
||||||
|
content = content.replace("`", "'");
|
||||||
|
}
|
||||||
// More than 512 characters or is more than 4 lines
|
// More than 512 characters or is more than 4 lines
|
||||||
if (content.length() > 512 || content.chars().filter(ch -> ch == '\n').count() > 4) {
|
if (content.length() > 512 || content.chars().filter(ch -> ch == '\n').count() > 4) {
|
||||||
return "*Content too long, [click here to view]("+PasteUtils.uploadPaste(content).getUrl()+")*";
|
return "*Content too long, [click here to view]("+PasteUtils.uploadPaste(content).getUrl()+")*";
|
||||||
|
Loading…
Reference in New Issue
Block a user