-
Notifications
You must be signed in to change notification settings - Fork 248
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
Use ES5 whitespace #60
Use ES5 whitespace #60
Conversation
Use JSON whitespace: <SP>, <TAB>, <CR>, and <LF>. Throw on any characters with a Unicode code point value of 0x1F or less.
Thanks @jordanbtucker! Just out of curiosity, what's your reasoning for this? Any harm in accepting more whitespace than JSON? (As long as it's not more than ES5.) |
{ | ||
// An invalid form feed character (\x0c) has been entered before this comment. | ||
// Be careful not to delete it. | ||
"a": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: let's standardize on 4-spaces. I know some of the test files use 2, sorry about that. =)
LGTM if you think this is worth merging! Feel free to then. =) |
You know, I was thinking the same thing about ES5 whitespace. I was going back and forth between JSON and ES5 whitespace. I don't remember why I chose JSON. Let me do some research and get back to you. |
Oh, now I remember. It was because ES5 supports whitespace from certain Unicode categories that we can't support yet. So I just went with JSON. I'm going to fix this to support as much ES5 whitespace as possible without venturing into Unicode territory. |
Use ES5 whitespace, minus Unicode
Use JSON whitespace: space, tab, carriage return and line feed.
Throw on any characters with a Unicode code point value of 0x1F or less.
See [ES §7.2] and [§15.12.1.1]