From 767aec7729a326ff1ccc225d8623a24dd1e698d5 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 5 Apr 2018 22:17:57 +0300 Subject: server: markdown command reply * also fixes new messages with one tag and attachment --- juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-server-jdbc/src/main/java/com/juick') diff --git a/juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java index 97627406..90b70612 100644 --- a/juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java +++ b/juick-server-jdbc/src/main/java/com/juick/service/TagServiceImpl.java @@ -51,7 +51,7 @@ import java.util.stream.Stream; @Repository public class TagServiceImpl extends BaseJdbcService implements TagService { private static final Pattern TAGS_PATTERN1 = Pattern.compile("^(?:(?:\\*[^ \\r\\n\\t]+)|\\s)+$"); - private static final Pattern TAGS_PATTERN2 = Pattern.compile("^\\*([^ \\r\\n\\t]+)\\s+([\\s\\S]+)"); + private static final Pattern TAGS_PATTERN2 = Pattern.compile("^\\*([^ \\r\\n\\t]+)[\\s+]?([\\s\\S]+)?"); private static final Pattern TAG_PATTERN = Pattern.compile("\\*([^ \\r\\n\\t]+)"); private final MessagesService messagesService; -- cgit v1.2.3