Skip to content

Commit

Permalink
respect quotes in greedy strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Revxrsal committed Sep 22, 2024
1 parent 420d747 commit 5315b2b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ private StringParameterType(boolean greedy) {

@Override
public String parse(@NotNull MutableStringStream input, @NotNull ExecutionContext<CommandActor> context) {
if (greedy)
return input.consumeRemaining();
return input.readString();
if (input.peek() == '"' || !greedy)
return input.readString();
return input.consumeRemaining();
}

@Override public boolean isGreedy() {
Expand Down

0 comments on commit 5315b2b

Please sign in to comment.