mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2026-02-26 05:51:12 +01:00
only flag spaces if we haven't met an underscore
This commit is contained in:
@@ -87,8 +87,8 @@ public final class CharsReplacer implements Replacer {
|
|||||||
for (int i = startPlaceholder + 1; i < endPlaceholder; i++) {
|
for (int i = startPlaceholder + 1; i < endPlaceholder; i++) {
|
||||||
final char current = text.charAt(i);
|
final char current = text.charAt(i);
|
||||||
|
|
||||||
if (current == ' ') {
|
if (current == ' ' && underscoreIndex == -1) {
|
||||||
// Invalid placeholder (contains space).
|
// Invalid placeholder (contains space before _).
|
||||||
// Treat the opening symbol as literal text and search for the next one.
|
// Treat the opening symbol as literal text and search for the next one.
|
||||||
builder.append(head);
|
builder.append(head);
|
||||||
cursor = startPlaceholder + 1;
|
cursor = startPlaceholder + 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user