Minor bugs fixed.

This commit is contained in:
Alex Ning 2019-08-26 23:37:42 +08:00
parent 9469ecc611
commit 3d50afd139

View File

@ -2,7 +2,7 @@ package ml.docilealligator.infinityforreddit;
class Utils {
static String addSubredditAndUserLink(String markdown) {
return markdown.replaceAll("(?<!\\w)/+u/\\w+/*", "[$0]($0)")
.replaceAll("(?<!\\w)/+r/\\w+/*", "[$0]($0)");
return markdown.replaceAll("(?<!\\w)/*u/\\w+/*", "[$0]($0)")
.replaceAll("(?<!\\w)/*r/\\w+/*", "[$0]($0)");
}
}