mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Don't convert URLs in format
This commit is contained in:
1 parent
20a5bdf11b
commit
a08802bf57
1 file changed
+1
-1
+1
-1
@@ -14,7 +14,7 @@ public class UrlLinkHandler {
|
||||
// TODO: permission to make links clickable, maybe?
|
||||
CarbonEvents.register(ChatFormatEvent.class, PostOrders.NORMAL, true, event -> {
|
||||
event.message(URL_PATTERN.matcher(event.message()).replaceAll("<click:open_url:'$1'>$1</click>"));
|
||||
event.format(URL_PATTERN.matcher(event.format()).replaceAll("<click:open_url:'$1'>$1</click>"));
|
||||
// Reminder: Do not use this on event.format(), this breaks hover events when they contain URLs
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user