Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 00:50:13 +01:00
Merge pull request #2003 from connorhartley/chatitemrewriter-fix
Ensure normal keys that end with numbers don't get matched and replaced when replacing indexes
Dieser Commit ist enthalten in:
Commit
83a49a686a
@ -9,7 +9,7 @@ import us.myles.ViaVersion.api.data.UserConnection;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
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
|
||||
|
||||
public static void toClient(JsonElement element, UserConnection user) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren