Multi-line strings bug, but not in Chrome

31 views
Skip to first unread message

Aseem Kishore

unread,
Jan 27, 2013, 9:11:58 PM1/27/13
to nod...@googlegroups.com
For as long as I can remember (back to Node 0.4), Node's behavior with multi-line strings has been a little incorrect w.r.t. the ES5 standard:

'hello\
        world'

Should evaluate to 'hello        world', but evaluates in Node 0.6, 0.8, and even the latest 0.9, to 'helloworld'.

I'd always assumed this was a V8 bug, but I thought to try it in Chrome just now, and it works correctly in Chrome.

Strange! Anyone have any idea why this is?

Someone else also noticed this bug and filed a V8 report, but it was closed -- presumably because it works correctly in Chrome:


Thanks guys,

Aseem

mscdex

unread,
Jan 27, 2013, 9:26:06 PM1/27/13
to nodejs
On Jan 27, 9:11 pm, Aseem Kishore <aseem.kish...@gmail.com> wrote:
> 'hello\
>         world'
>
> Should evaluate to 'hello        world', but evaluates in Node 0.6, 0.8,
> and even the latest 0.9, to 'helloworld'.

It does. However, not in the REPL.
Reply all
Reply to author
Forward
0 new messages