Skip to content

Conversation

@willkroboth
Copy link
Collaborator

@willkroboth willkroboth commented Jun 5, 2023

The focus of this PR is to expand the features of the MapArgument. These include

  • Optional quoting for keys and values
  • No restriction on the characters that are allowed in a key (previously only letters, digits, and underscore)
  • String instead of char delimiters (so long delimiters like -> are possible) Nevermind, not doing that
  • Allow defining String separators between key-value pairs (instead of just space)
  • Suggestion handling for escape characters

This also generally recodes the internals of the MapArgument to use Brigadier's StringReader and merge logic shared between key and value processing. ArgumentMapTests had many (perhaps too many :P) tests added with the goal of 100% Jacoco coverage.

Copy link
Member

@DerEchtePilz DerEchtePilz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this were just points about the delimiter. To be able to submit another review (if necessary) I need to understand this first but that's on me :D

@willkroboth willkroboth requested a review from DerEchtePilz June 5, 2023 22:48
@willkroboth willkroboth requested a review from JorelAli June 8, 2023 11:07
willkroboth and others added 23 commits June 8, 2023 17:47
Reverse escape quotes at the start of unquoted strings
This case originally threw an unhelpful IndexOutOfBounds on MapArgument line 453
Copy link
Member

@JorelAli JorelAli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I'm happy with the results. You're good to merge.
We need to make sure we don't forget to add a global changelog entry for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants