Remove attachments in bbcode conversion

This commit is contained in:
Nassim Jahnke 2023-01-17 09:29:36 +01:00
parent ae9321f554
commit dedb923847
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 2 additions and 5 deletions

View File

@ -28,6 +28,7 @@ public class BBCodeConverter {
REPLACERS.put("font", (tag, tagArg, content) -> content);
REPLACERS.put("user", (tag, tagArg, content) -> content);
REPLACERS.put("list", (tag, tagArg, content) -> content);
REPLACERS.put("attach", (tag, tagArg, content) -> content);
REPLACERS.put("spoiler", (tag, tagArg, content) -> "<details>\n<summary>%s</summary>\n\n%s\n</details>\n".formatted(removeQuotes(tagArg), content));
REPLACERS.put("b", (tag, tagArg, content) -> "**" + content + "**");
@ -103,10 +104,6 @@ public class BBCodeConverter {
return true;
}
});
REPLACERS.put("attach", ((tag, tagArg, content) -> {
final String imageUrl = "https://www.spigotmc.org/attachments/" + content;
return "![" + imageUrl + "](" + imageUrl + ")";
}));
// Unordered list entries (do not have closing tags)
SIMPLE_SINGLETON_REPLACERS.put("*", "* ");

@ -1 +1 @@
Subproject commit 3b04063680228d1846c36be4024086b5017beec7
Subproject commit 3cd793fada74c49f03777cda2ba818d6c8bb83ae