Skip to content

Commit

Permalink
put placeholder setting replacing prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Oct 25, 2024
1 parent 573fc4b commit c614b0f
Showing 1 changed file with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,10 @@ private void migrateConfig() {
if (matcher.matches()) {
String placeholder = Optional.ofNullable(matcher.group(2)).orElse("");
String prefix = Optional.ofNullable(matcher.group(1)).map(String::toLowerCase).orElse("");
boolean isOnlineOnly = prefix.contains("[online]");
boolean isAsync = prefix.contains("[async]");
boolean isLenient = prefix.contains("[lenient]");
map.put("placeholder", placeholder);
if (isOnlineOnly) {
map.put("online", true);
}
if (isAsync) {
map.put("async", true);
}
if (isLenient) {
map.put("lenient", true);
}
map.put("online", prefix.contains("[online]"));
map.put("async", prefix.contains("[async]"));
map.put("lenient", prefix.contains("[lenient]"));
} else {
map.put("placeholder", value);
}
Expand Down

0 comments on commit c614b0f

Please sign in to comment.