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

Adjust robot command regex to allow whitespace at end #234

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gsteinLTU
Copy link
Member

Close #171

@dragazo
Copy link
Contributor

dragazo commented Apr 27, 2024

We could do this as a normalization step at the start of the function. We might also want to allow multiple spaces by doing something like command = command.trim().replace(/\s+/g, ' '), unless we have meaningful internal spaces somewhere.

@gsteinLTU
Copy link
Member Author

I'd probably agree with just doing a trim first (so it gets whitespace off the beginning too), but I don't think we should "fix" whitespace inside messages. If it was a protocol for actual use I'd be for it, but it'll make the codebreaking activity a lot harder than it needs to be if students are aware.

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.

RoboScape commands should be trimmed
2 participants