aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/util/formatters/PlainTextFormatter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/util/formatters/PlainTextFormatter.java')
-rw-r--r--src/main/java/com/juick/util/formatters/PlainTextFormatter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/util/formatters/PlainTextFormatter.java b/src/main/java/com/juick/util/formatters/PlainTextFormatter.java
index 9a885bca..682a15b4 100644
--- a/src/main/java/com/juick/util/formatters/PlainTextFormatter.java
+++ b/src/main/java/com/juick/util/formatters/PlainTextFormatter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2020, Juick
+ * Copyright (C) 2008-2024, Juick
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -62,7 +62,7 @@ public class PlainTextFormatter {
sb.append(attachmentUrl).append("\n");
}
if (txt.length() >= cropLength) {
- sb.append(StringUtils.substring(txt, 0, cropLength)).append(" [...]");
+ sb.append(StringUtils.abbreviate(txt, "[…]", cropLength));
} else {
sb.append(txt);
}