fix markdown in the message breaking the log

This commit is contained in:
Lee 2024-07-05 21:12:25 +01:00
parent 0cfccc70d8
commit fdd36d4385

@ -58,6 +58,9 @@ public class LogFeature extends Feature {
if (content == null) {
return "No content";
}
if (content.contains("`")) { // Workaround for markdown formatting
content = content.replace("`", "'");
}
// More than 512 characters or is more than 4 lines
if (content.length() > 512 || content.chars().filter(ch -> ch == '\n').count() > 4) {
return "*Content too long, [click here to view]("+PasteUtils.uploadPaste(content).getUrl()+")*";