Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚸 Better support quoted strings and escaped quotes in strings #23

Merged
merged 2 commits into from
May 18, 2024

Conversation

decaprime
Copy link
Owner

This addresses how input command strings are split into parts, considering a command like

[Command("cmd")] void F(ICommandContext x, string arg)
  1. Addresses Quoted strings without spaces fail to parse in GetParts #22 so .cmd "a" now passes a for arg
  2. Add literal spacing to strings so .cmd " a b " now passes a b for arg
  3. Add escapes \ to strings so .cmd "hey \"pal\"" now passes hey "pal" for arg

I'm unsure if this could break any existing commands, or misses some edge case, but I think it moves the user experience forward. Overall the test suite has more coverage and I tested E2E with a plugin.

@decaprime decaprime merged commit d432c15 into main May 18, 2024
1 check passed
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.

1 participant