mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-22 07:11:49 +01:00
Fix regression w/empty strings with KeywordReplacer (#5378)
This commit is contained in:
parent
fc3dabf8f5
commit
8d07c4bb0f
@ -142,7 +142,7 @@ public class KeywordReplacer implements IText {
|
||||
String line = input.getLines().get(i);
|
||||
|
||||
// Skip processing b64 encoded items, they will not have keywords in them.
|
||||
if (line.charAt(0) == '@') {
|
||||
if (line.startsWith("@")) {
|
||||
replaced.add(line);
|
||||
continue;
|
||||
}
|
||||
@ -383,7 +383,7 @@ public class KeywordReplacer implements IText {
|
||||
|
||||
if (this.replaceSpacesWithUnderscores) {
|
||||
// Don't replace spaces with underscores in command nor escape underscores.
|
||||
if (line.charAt(0) != '/') {
|
||||
if (line.startsWith("/")) {
|
||||
replacer = replacer.replace("_", "\\_").replaceAll("\\s", "_");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user