Make setPlaceholders behavior consistent with setRelationalPlaceholders

Relational placeholders require an underscore after the identifier to be considered valid. For example: `%rel_chatchat_%` is valid but `%rel_chatchat%` is not. Normal placeholders did not require this and `%chatchat%` worked the same as `%chatchat_%`.
This commit is contained in:
BlitzOffline 2023-03-24 21:22:53 +02:00
parent e862abe0b4
commit ef73b765de
No known key found for this signature in database
GPG Key ID: 2F72935E076F09A0

View File

@ -67,10 +67,14 @@ public final class CharsReplacer implements Replacer {
hadSpace = true; hadSpace = true;
break; break;
} }
if (p == closure.tail) { if (p == closure.tail && identified) {
invalid = false; invalid = false;
break; break;
} }
if (p == closure.tail) {
identifier.append(p);
break;
}
if (p == '_' && !identified) { if (p == '_' && !identified) {
identified = true; identified = true;