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

Merged
merged 2 commits into from
Dec 11, 2024

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.

@dragazo dragazo merged commit c9026f2 into main Dec 11, 2024
1 of 3 checks passed
@dragazo dragazo deleted the 171-trim-roboscape branch December 11, 2024 03:18
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