-
Notifications
You must be signed in to change notification settings - Fork 21
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
Prevent <<command("parameters",123)>> from crashing bondage.js #40
Conversation
Seems to pass the tests fine still
This is looking good so far! The space thing is an issue though, I think it's related to this line https://github.com/jhayley/bondage.js/blob/40748d2e50e26f40398df0a01e4d0bc070fe35e6/src/parser/parser.js#L116 |
Ah yes, I think you're right. I had my suspicions, but now its pretty clear. I will try to tackle this tonight :) |
@jhayley fixed now and passing all tests :) even the new tests |
also extend the tests a little more
This greatly simplifies command parsing and allows spaces inside <<>> without any ugly hacks
@jhayley After ranting with myself for a bit here, I eventually created a new 'CommandCall' token and removed the ugly hack altogether. All tests passing, simplified command parser code and anything allowed inside << >>, even spaces - without using that workaround that artificially inserts spaces My regular expression basically takes anything that is not >> and allows it Best part is, we no longer need this line:
|
Looks good! Will push to npm when I have a chance |
Thank you J
=)
…On Fri, 28 Sep 2018 18:08 j hayley, ***@***.***> wrote:
Merged #40 <#40> into master.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#40 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGMbVal6oKzyaGYvgMb1Jlhip79LjVmAks5uflemgaJpZM4WxEXD>
.
|
pushed! ✨ |
Gave this another shot - this time from a different angle. Much thanks to @jhayley for the kind feedback and patience :)
There is still a quirk seen here:
https://github.com/jhayley/bondage.js/pull/40/files#diff-1f6fe15287b398db63504fd4a8ee9bbbR404
Not sure why bondage.js adds an extra space before the "("