diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-08-26 07:24:49 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-08-26 07:24:49 +0000 |
commit | 285bb0c385a3f46566491a7da5e58ef2fb840d44 (patch) | |
tree | 2172c729d80385ba0d2432d17454a5264f40b3c6 /app/src/main/java/ml | |
parent | 331704e5ef7c7f4d2014799776e51fde75e1608c (diff) | |
download | infinity-for-reddit-285bb0c385a3f46566491a7da5e58ef2fb840d44.tar infinity-for-reddit-285bb0c385a3f46566491a7da5e58ef2fb840d44.tar.gz infinity-for-reddit-285bb0c385a3f46566491a7da5e58ef2fb840d44.tar.bz2 infinity-for-reddit-285bb0c385a3f46566491a7da5e58ef2fb840d44.tar.lz infinity-for-reddit-285bb0c385a3f46566491a7da5e58ef2fb840d44.tar.xz infinity-for-reddit-285bb0c385a3f46566491a7da5e58ef2fb840d44.tar.zst infinity-for-reddit-285bb0c385a3f46566491a7da5e58ef2fb840d44.zip |
Fix an issue in modifyMarkdown(String markdown) in Utils.Utils about matching subreddits and users.
Diffstat (limited to 'app/src/main/java/ml')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/Utils/Utils.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/Utils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/Utils.java index f74d604e..384839bc 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/Utils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/Utils.java @@ -34,7 +34,7 @@ public class Utils { private static final long YEAR_MILLIS = 12 * MONTH_MILLIS; public static String modifyMarkdown(String markdown) { - StringBuilder regexed = new StringBuilder(markdown.replaceAll("((?<=[\\s])|^)/{0,1}[rRuU]/[\\w-]+/{0,1}", "[$0](https://www.reddit.com/$0)")); + StringBuilder regexed = new StringBuilder(markdown.replaceAll("((?<=[\\s])|^)/[rRuU]/[\\w-]+/{0,1}", "[$0](https://www.reddit.com$0)").replaceAll("((?<=[\\s])|^)[rRuU]/[\\w-]+/{0,1}", "[$0](https://www.reddit.com/$0)")); int startIndex = 0; |