diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-12-25 15:03:25 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-12-25 15:03:25 +0000 |
commit | bff944c1070ca64b3761bd0d1ef4dd177d816d77 (patch) | |
tree | 0dfc8dad6b4210074e4939ef132926a8bd58b69d /app/src | |
parent | b3542c6c99fbdbc09500dcf8c09528c3489bbdd3 (diff) | |
download | infinity-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 'app/src')
-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 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) { |