From b8f33cb6822bd2c228a015af227facd000e28244 Mon Sep 17 00:00:00 2001 From: scria1000 <91804886+scria1000@users.noreply.github.com> Date: Mon, 15 Nov 2021 08:42:07 +0000 Subject: 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!< >!!< --- app/src/main/java/ml/docilealligator/infinityforreddit/utils/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src') 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?!<)", ">!$1") // html entity remains escaped inside an inline block + .replaceAll(">!(\\n?(?:[\\S\\h]+?(?:\\n?[\\S\\h]+?)?)\\n?)!<", ">!$1!<") // html entity remains escaped inside an inline block .replaceAll("(^|^ *|\\n *)#(?!($|\\s|#))", "$0 ") .replaceAll("(^|^ *|\\n *)##(?!($|\\s|#))", "$0 ") .replaceAll("(^|^ *|\\n *)###(?!($|\\s|#))", "$0 ") -- cgit v1.2.3