FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MapArgument feature expansion by willkroboth · Pull Request #455 · CommandAPI/CommandAPI · GitHub

MapArgument feature expansion - #455

Merged
willkroboth merged 30 commits into
dev/devfrom
dev/map-argument
Jun 9, 2023
Merged

MapArgument feature expansion#455
willkroboth merged 30 commits into
dev/devfrom
dev/map-argument

Conversation

willkroboth commented Jun 5, 2023
edited
Loading

Copy link
Copy Markdown
Collaborator

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.

DerEchtePilz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Comment thread docssrc/src/argument_map.md Outdated
Comment thread docssrc/src/argument_map.md Outdated
Comment thread docssrc/src/upgrading.md Outdated
willkroboth requested a review from DerEchtePilz June 5, 2023 22:48
Comment thread docssrc/src/argument_map.md Outdated
willkroboth requested a review from JorelAli June 8, 2023 11:07
Comment thread docssrc/src/argument_map.md Outdated
Comment thread docssrc/src/argument_map.md Outdated
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

JorelAli left a comment
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL