-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add note about escaping %
#218
base: main
Are you sure you want to change the base?
Conversation
|
I have been using the web console to "print an object" and copy-paste it from a web console into a file since 2010 (for debugging, comparing two versions of data), and it is suddenly broken.
|
If I'm reading the spec:
So the screenshot in #218 (comment) for Chrome seems to be wrong for me. Did Chrome behavior changed recently ? That being said, if you test with multiple parameters, as expected when using specifiers So, the change here makes sense to me, but I guess a bug should be filed on Chrome for |
@nchevobbe It shouldn't even get there, it fails the earlier check in That said, once properly in |
I found a similar issue: console.error( 'message: %s', '%hello%%world%'); Chrome:
Firefox:
|
Was reminded of this Issue and wondering what to make of it. Do we agree it's somewhat of an interop issue? |
I think so, yes. I guess this PR just needs the appropriate changes to |
Great.
This is out of my comfort zone. Edits by maintainers are allowed, so please feel free to pile onto this PR with more changes. |
I'd appreciate a first stab at it if possible, as I probably won't have time myself to drive the changes for a little while. But the algorithms you'd need to touch aren't too complicated I promise! |
console.log() with a single parameter should print exactly the string which it received. When I have an object in JS, I want to save it into a JSON file. I do
And when I copy-paste it from a console to a text file, I get a different object. |
So looking back at the original post #218 (comment), which of the two behaviors is considered correct? |
As noted in #218 (comment), the current specification is to not intepret |
It looks like a bit of an interop issue:
Chrome:
Safari:
Firefox:
Preview | Diff