From ead33c2813b71b94a22e002b0ff3f018531f960a Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 13 Mar 2018 10:20:13 +0300 Subject: www: new line before quote --- .../mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'juick-www') diff --git a/juick-www/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java b/juick-www/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java index 14af2539..edb6c827 100644 --- a/juick-www/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java +++ b/juick-www/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java @@ -35,7 +35,8 @@ public class FormatMessageFilter implements Filter { if (input instanceof Message) { Message msg = (Message) input; boolean isCode = msg.getTags().stream().anyMatch(t -> t.getName().equals("code")); - String msgTxt = msg.getRid() > 0 ? String.format("@%s, %s", msg.getTo().getName(), StringUtils.defaultString(msg.getText())) + String formatString = MessageUtils.replyStartsWithQuote(msg) ? "@%s,\n%s" : "@%s, %s"; + String msgTxt = msg.getRid() > 0 ? String.format(formatString, msg.getTo().getName(), StringUtils.defaultString(msg.getText())) : StringUtils.defaultString(msg.getText()); String formattedMessage = isCode ? MessageUtils.formatMessageCode(msgTxt) : MessageUtils.formatMessage(msgTxt); -- cgit v1.2.3