Skip to content

Commit

Permalink
use quote() instead of replaceAll()
Browse files Browse the repository at this point in the history
  • Loading branch information
sovdeeth committed Aug 14, 2024
1 parent 2401841 commit ff46c2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/ch/njol/skript/command/CommandUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public CommandUsage(@Nullable VariableString usage, String defaultUsage) {
// Manually escape quotes. This is not a good solution, as it doesn't handle many other issues, like % in
// commands, but in lieu of re-writing the argument parser and command logic completely, I believe this is
// a decent stop-gap measure for using " in commands.
defaultUsage = defaultUsage.replaceAll("\"", "\"\"");
defaultUsage = VariableString.quote(defaultUsage);
usage = VariableString.newInstance(defaultUsage);
assert usage != null;
}
Expand Down

0 comments on commit ff46c2d

Please sign in to comment.