This repository has been archived by the owner. It is now read-only.

Node console backslash handling. #310

Closed
ericelliott opened this Issue Sep 28, 2010 · 6 comments

Comments

Projects
None yet
3 participants

I discovered this when I was trying to test my backslash replacements.

node> "\\\\"
'\\\'

node> "1\/2\\3\\4\\5\\6\\"
'1/2\\3\\4\\5\\6\'

~/tmp# cat testme.js
console.log("\\\\");

:~/tmp# node testme.js
\\

Sorry, that got slaughtered.

http://gist.github.com/600294

@ghost

ghost commented Feb 17, 2011

works for me on 0.4.0:
tahu@server:/nodetesting$ node
> ""
''
> "1/2\3\4\5\6"
...
tahu@server:
/nodetesting$ cat testme.js
console.log("\");
tahu@server:~/nodetesting$ node testme.js
\

UPDATE: I'm on Ubuntu 10.04.2

Still broken for me using 0.4.0 on Mac OS X. See updated Gist:

https://gist.github.com/600294

isaacs commented Mar 29, 2011

Aha, yeah, it seems like the console format function is doing something weird there.

isaacs commented Apr 2, 2011

Closed by 4d64f36 Format slashes properly

@ry ry closed this Apr 2, 2011

coolaj86 pushed a commit that referenced this issue Apr 15, 2011

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.