aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator/infinityforreddit
diff options
context:
space:
mode:
authorscria1000 <91804886+scria1000@users.noreply.github.com>2021-11-15 08:42:07 +0000
committerGitHub <noreply@github.com>2021-11-15 08:42:07 +0000
commitb8f33cb6822bd2c228a015af227facd000e28244 (patch)
tree0cf4e588e71a540e38112c6bddc0c181f5efd015 /app/src/main/java/ml/docilealligator/infinityforreddit
parent2e0725e25e3f8eea0871c9e3a48fec673618298a (diff)
downloadinfinity-for-reddit-b8f33cb6822bd2c228a015af227facd000e28244.tar
infinity-for-reddit-b8f33cb6822bd2c228a015af227facd000e28244.tar.gz
infinity-for-reddit-b8f33cb6822bd2c228a015af227facd000e28244.tar.bz2
infinity-for-reddit-b8f33cb6822bd2c228a015af227facd000e28244.tar.lz
infinity-for-reddit-b8f33cb6822bd2c228a015af227facd000e28244.tar.xz
infinity-for-reddit-b8f33cb6822bd2c228a015af227facd000e28244.tar.zst
infinity-for-reddit-b8f33cb6822bd2c228a015af227facd000e28244.zip
Don't leave out single character
oops >! match this!< >!match this!< >! match this!< >!don't match this<! >! match this !< >!match this !< >! match this!< >! O!< >! O !< >! X !< >! DON'TMATCH !< >!O!< >! O O!< >!!<
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 ")