Treat color codes as an end of a url
Dieser Commit ist enthalten in:
Ursprung
a118e4c40d
Commit
0908362738
@ -1,11 +1,11 @@
|
|||||||
From aee9dd47382b1bdbe781004dce9da712593a0b0d Mon Sep 17 00:00:00 2001
|
From 60d13067607d49b8e4b3709249f2bfb0ea81c5f2 Mon Sep 17 00:00:00 2001
|
||||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||||
Date: Sat, 18 Jan 2014 19:32:42 +0000
|
Date: Sat, 18 Jan 2014 19:32:42 +0000
|
||||||
Subject: [PATCH] Support non-prefixed URLs
|
Subject: [PATCH] Support non-prefixed URLs
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||||
index 2b57bf8..a3de612 100644
|
index 2b57bf8..ce2c6bb 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||||
@@ -19,7 +19,7 @@ import com.google.common.collect.ImmutableMap.Builder;
|
@@ -19,7 +19,7 @@ import com.google.common.collect.ImmutableMap.Builder;
|
||||||
@ -13,7 +13,7 @@ index 2b57bf8..a3de612 100644
|
|||||||
private static class StringMessage {
|
private static class StringMessage {
|
||||||
private static final Map<Character, EnumChatFormat> formatMap;
|
private static final Map<Character, EnumChatFormat> formatMap;
|
||||||
- private static final Pattern INCREMENTAL_PATTERN = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-or])|(\\n)|(?:(https?://[^ ][^ ]*?)(?=[\\.\\?!,;:]?(?:[ \\n]|$)))", Pattern.CASE_INSENSITIVE);
|
- private static final Pattern INCREMENTAL_PATTERN = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-or])|(\\n)|(?:(https?://[^ ][^ ]*?)(?=[\\.\\?!,;:]?(?:[ \\n]|$)))", Pattern.CASE_INSENSITIVE);
|
||||||
+ private static final Pattern INCREMENTAL_PATTERN = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-or])|(\\n)|((?:(?:https?)://)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[ \\n]|$))))", Pattern.CASE_INSENSITIVE);
|
+ private static final Pattern INCREMENTAL_PATTERN = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-or])|(\\n)|((?:(?:https?)://)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + " \\n]|$))))", Pattern.CASE_INSENSITIVE);
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Builder<Character, EnumChatFormat> builder = ImmutableMap.builder();
|
Builder<Character, EnumChatFormat> builder = ImmutableMap.builder();
|
||||||
@ -37,5 +37,5 @@ index 2b57bf8..a3de612 100644
|
|||||||
|
|
||||||
private void appendNewComponent(int index) {
|
private void appendNewComponent(int index) {
|
||||||
--
|
--
|
||||||
1.8.3.2
|
1.9.1
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren