mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-02-11 14:52:01 +08:00
Remove attachments in bbcode conversion
This commit is contained in:
parent
ae9321f554
commit
dedb923847
@ -28,6 +28,7 @@ public class BBCodeConverter {
|
|||||||
REPLACERS.put("font", (tag, tagArg, content) -> content);
|
REPLACERS.put("font", (tag, tagArg, content) -> content);
|
||||||
REPLACERS.put("user", (tag, tagArg, content) -> content);
|
REPLACERS.put("user", (tag, tagArg, content) -> content);
|
||||||
REPLACERS.put("list", (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("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 + "**");
|
REPLACERS.put("b", (tag, tagArg, content) -> "**" + content + "**");
|
||||||
@ -103,10 +104,6 @@ public class BBCodeConverter {
|
|||||||
return true;
|
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)
|
// Unordered list entries (do not have closing tags)
|
||||||
SIMPLE_SINGLETON_REPLACERS.put("*", "* ");
|
SIMPLE_SINGLETON_REPLACERS.put("*", "* ");
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 3b04063680228d1846c36be4024086b5017beec7
|
Subproject commit 3cd793fada74c49f03777cda2ba818d6c8bb83ae
|
Loading…
Reference in New Issue
Block a user