master #1

Merged
bedohswe merged 27 commits from pixtaded/crab:master into master 2025-02-11 18:05:01 +00:00
Showing only changes of commit f03666bead - Show all commits

View File

@ -6,6 +6,8 @@ public class Sanitizer {
if (sanitizeNewlines) { if (sanitizeNewlines) {
sanitized = sanitized.replaceAll("\n", "\\\\n"); sanitized = sanitized.replaceAll("\n", "\\\\n");
if (!s.endsWith("\n")) sanitized += '\n'; if (!s.endsWith("\n")) sanitized += '\n';
} else {
sanitized = sanitized.replaceAll("\n\n+", "\n");
} }
return sanitized; return sanitized;
} }
@ -13,4 +15,4 @@ public class Sanitizer {
public static String formatMessage(long timeMillis, String address, String content) { public static String formatMessage(long timeMillis, String address, String content) {
return String.format("[%td.%1$tm.%1$tY %1$tR] {%s} %s", timeMillis, address, content); return String.format("[%td.%1$tm.%1$tY %1$tR] {%s} %s", timeMillis, address, content);
} }
} }