mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-30 12:57:12 +01:00
Fix regex matcher for # heading.
This commit is contained in:
parent
c2abe90ba2
commit
453b56d485
@ -41,7 +41,12 @@ 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("(?<![\\[\\(])#(?![# ])(?![\\w\\s]*[\\]\\)])", "# "));
|
||||
.replaceAll("^#(?!($|\\s))", "# ")
|
||||
.replaceAll("^##(?!($|\\s))", "## ")
|
||||
.replaceAll("^###(?!($|\\s))", "### ")
|
||||
.replaceAll("^####(?!($|\\s))", "#### ")
|
||||
.replaceAll("^#####(?!($|\\s))", "##### ")
|
||||
.replaceAll("^######(?!($|\\s))", "###### "));
|
||||
|
||||
//Fix superscript
|
||||
int startIndex = regexed.indexOf("^");
|
||||
|
Loading…
Reference in New Issue
Block a user