mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-30 21:07:11 +01:00
Fix regex for supporting snudown's header.
This commit is contained in:
parent
05b8b73043
commit
0887b53426
@ -40,7 +40,8 @@ public class Utils {
|
||||
StringBuilder regexed = new StringBuilder(markdown
|
||||
.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("#(?![# ])", "# "));
|
||||
.replaceAll("\\^{2,}", "^")
|
||||
.replaceAll("(?<![\\[\\(])#(?![# ])(?![\\w\\s]*[\\]\\)])", "# "));
|
||||
|
||||
//Fix superscript
|
||||
int startIndex = regexed.indexOf("^");
|
||||
|
Loading…
Reference in New Issue
Block a user