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

fix/tidy handling of object literal shorthand syntax #15

Merged
merged 1 commit into from
Nov 15, 2019

Conversation

Conduitry
Copy link
Collaborator

@Conduitry Conduitry commented Nov 15, 2019

Fixes #14.

This also tidies up the logic here a little bit. I don't see any reason to be looking at the arrays that are the result of calling handle(), so this is now just looking directly at the node.

@Conduitry
Copy link
Collaborator Author

Conduitry commented Nov 15, 2019

Oh. I think this won't catch instances of things like { "foo": foo } with a literal string instead of an identifier for the key. Blah. Guess that complication was there for a reason.

Edit: Oh pt II. Actually it looks like #9 broke that shorthand, not this PR. Might as well fix that at the same time then.

@Conduitry
Copy link
Collaborator Author

Fix and additional test pushed.

@Rich-Harris Rich-Harris merged commit 7b01aa7 into Rich-Harris:master Nov 15, 2019
@Conduitry Conduitry deleted the gh-14 branch November 15, 2019 17:35
@Rich-Harris
Copy link
Owner

nice. released 0.0.22

tanhauhau pushed a commit to tanhauhau/code-red that referenced this pull request Sep 13, 2022
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.

Printing of object shorthand syntax still not quite right
2 participants