Commit 5524ec12 by 段启岩

动态删除行为换行

parent be25a432
...@@ -27,9 +27,6 @@ public class TopicUtils { ...@@ -27,9 +27,6 @@ public class TopicUtils {
public static String encodeTopic(String str) { public static String encodeTopic(String str) {
Assert.hasText(str, "str must not be empty"); Assert.hasText(str, "str must not be empty");
str = str.replaceAll(tailLFPattern.pattern(), "");
Matcher matcher = topicPattern.matcher(str); Matcher matcher = topicPattern.matcher(str);
StringBuffer buffer = new StringBuffer(); StringBuffer buffer = new StringBuffer();
...@@ -48,6 +45,7 @@ public class TopicUtils { ...@@ -48,6 +45,7 @@ public class TopicUtils {
if (matcher.find()) { if (matcher.find()) {
result = matcher.replaceAll(""); result = matcher.replaceAll("");
} }
result = result.replaceAll(tailLFPattern.pattern(), "");
return result; return result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment