Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-09 17:50:23 +01:00
Ensure normal keys that end with numbers dont get matched and replaced
Dieser Commit ist enthalten in:
Ursprung
37170a2180
Commit
a4920a2c74
@ -9,7 +9,7 @@ import us.myles.ViaVersion.api.data.UserConnection;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class ChatItemRewriter {
|
public class ChatItemRewriter {
|
||||||
private static final Pattern indexRemoval = Pattern.compile("\\d+:(?=([^\"\\\\]*(\\\\.|\"([^\"\\\\]*\\\\.)*[^\"\\\\]*\"))*[^\"]*$)");
|
private static final Pattern indexRemoval = Pattern.compile("(?<![\\w-.+])\\d+:(?=([^\"\\\\]*(\\\\.|\"([^\"\\\\]*\\\\.)*[^\"\\\\]*\"))*[^\"]*$)");
|
||||||
// Taken from https://stackoverflow.com/questions/6462578/alternative-to-regex-match-all-instances-not-inside-quotes
|
// Taken from https://stackoverflow.com/questions/6462578/alternative-to-regex-match-all-instances-not-inside-quotes
|
||||||
|
|
||||||
public static void toClient(JsonElement element, UserConnection user) {
|
public static void toClient(JsonElement element, UserConnection user) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren