aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2023-12-25 15:03:25 +0000
committerDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2023-12-25 15:03:25 +0000
commitbff944c1070ca64b3761bd0d1ef4dd177d816d77 (patch)
tree0dfc8dad6b4210074e4939ef132926a8bd58b69d /app/src
parentb3542c6c99fbdbc09500dcf8c09528c3489bbdd3 (diff)
downloadinfinity-for-reddit-bff944c1070ca64b3761bd0d1ef4dd177d816d77.tar
infinity-for-reddit-bff944c1070ca64b3761bd0d1ef4dd177d816d77.tar.gz
infinity-for-reddit-bff944c1070ca64b3761bd0d1ef4dd177d816d77.tar.bz2
infinity-for-reddit-bff944c1070ca64b3761bd0d1ef4dd177d816d77.tar.lz
infinity-for-reddit-bff944c1070ca64b3761bd0d1ef4dd177d816d77.tar.xz
infinity-for-reddit-bff944c1070ca64b3761bd0d1ef4dd177d816d77.tar.zst
infinity-for-reddit-bff944c1070ca64b3761bd0d1ef4dd177d816d77.zip
Refine regex.
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java2
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 aa462953..48e8fedb 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java
@@ -77,7 +77,7 @@ public final class Utils {
//Matches preview.redd.it and i.redd.it media
//For i.redd.it media, it only matches [caption](image-link. Notice there is no ) at the end.
//i.redd.it: (\\[(?:(?!((?<!\\\\)\\[)).)*?]\\()?https://i.redd.it/\\w+.(jpg|png|jpeg|gif)"
- Pattern.compile("((?:\\[(?:(?!((?<!\\\\)\\[)).)*?]\\()?https://preview.redd.it/\\w+.(?:jpg|png|jpeg)(?:(\\?+[-a-zA-Z0-9()@:%_+.~#?&/=]*)|))|((?:\\[(?:(?!((?<!\\\\)\\[)).)*?]\\()?https://i.redd.it/\\w+.(?:jpg|png|jpeg|gif))"),
+ Pattern.compile("((?:\\[(?:(?!(?:(?<!\\\\)\\[)).)*?]\\()?https://preview.redd.it/\\w+.(?:jpg|png|jpeg)(?:(?:\\?+[-a-zA-Z0-9()@:%_+.~#?&/=]*)|))|((?:\\[(?:(?!(?:(?<!\\\\)\\[)).)*?]\\()?https://i.redd.it/\\w+.(?:jpg|png|jpeg|gif))"),
};
public static String modifyMarkdown(String markdown) {