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
1 changed files with 5 additions and 1 deletions

View File

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