aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator/infinityforreddit
diff options
context:
space:
mode:
authorDocile-Alligator <chineseperson5@gmail.com>2021-11-15 11:08:58 +0000
committerGitHub <noreply@github.com>2021-11-15 11:08:58 +0000
commit22457af98a1445c31d5a64ec12abae5f31a80859 (patch)
treee7f5452f34d6f771069a98a8226d037e2b5df023 /app/src/main/java/ml/docilealligator/infinityforreddit
parentf94bd5039c2c809ac465af54496b8dafca8caada (diff)
parentb8f33cb6822bd2c228a015af227facd000e28244 (diff)
downloadinfinity-for-reddit-22457af98a1445c31d5a64ec12abae5f31a80859.tar
infinity-for-reddit-22457af98a1445c31d5a64ec12abae5f31a80859.tar.gz
infinity-for-reddit-22457af98a1445c31d5a64ec12abae5f31a80859.tar.bz2
infinity-for-reddit-22457af98a1445c31d5a64ec12abae5f31a80859.tar.lz
infinity-for-reddit-22457af98a1445c31d5a64ec12abae5f31a80859.tar.xz
infinity-for-reddit-22457af98a1445c31d5a64ec12abae5f31a80859.tar.zst
infinity-for-reddit-22457af98a1445c31d5a64ec12abae5f31a80859.zip
Merge pull request #533 from scria1000/regex-fix
Don't leave out single character
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
-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 8e5e73c1..15bcefa0 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java
@@ -65,7 +65,7 @@ public class Utils {
.replaceAll("((?<=[\\s])|^)/[rRuU]/[\\w-]+/{0,1}", "[$0](https://www.reddit.com$0)")
.replaceAll("((?<=[\\s])|^)[rRuU]/[\\w-]+/{0,1}", "[$0](https://www.reddit.com/$0)")
.replaceAll("\\^{2,}", "^")
- .replaceAll("(?:>!)(\\n?[\\S\\h]+?\\n?[\\S\\h]+\\n?!<)", "&gt;!$1") // html entity remains escaped inside an inline block
+ .replaceAll(">!(\\n?(?:[\\S\\h]+?(?:\\n?[\\S\\h]+?)?)\\n?)!<", "&gt;!$1!<") // html entity remains escaped inside an inline block
.replaceAll("(^|^ *|\\n *)#(?!($|\\s|#))", "$0 ")
.replaceAll("(^|^ *|\\n *)##(?!($|\\s|#))", "$0 ")
.replaceAll("(^|^ *|\\n *)###(?!($|\\s|#))", "$0 ")