Code based unicode symbols #14
Comments
That comes out as:
for me. Can you submit a failing test or a fix? |
Exactly, it comes as a string of two characters What I'd like is to have one character, the control character You can try with Maybe I'll have time to submit a test tomorrow |
Hmm, I guess i could decode the string with @mathiasbynens thoughts? |
That’s not what The easiest way to turn You could try to do the unescaping statically with a bunch of |
Maybe you could use https://github.com/espadrine/localeval. |
@mathiasbynens localeval looks extremely slow as it uses childprocess/worker. Can you make a module based on https://github.com/mathiasbynens/mothereff.in/blob/1a74e1614c7b4293ac28572a007bd6aada3e267e/js-escapes/eff.js#L61-L70 that I can recommend? |
IMHO this should be WONTFIXed. The main reason for using multiline is to not have to use escape sequences (for line terminators). If you want to use escape sequences in your strings, then don’t use multiline. Fixing it would be confusing — people expecting some level of compatibility with template strings (as implied in the README) would then get incorrect results. See the first example on https://github.com/lukehoban/es6features#template-strings which the README links to: // Basic literal string creation
`In JavaScript '\n' is a line-feed.` That template string is equivalent to In OP’s case, just use |
@mathiasbynens good point. i completely agree. thanks for chiming in :) |
Thanks for the useful references |
Do you think it's possible to extend multiline to support unicode characters?
In my tests I need to prepare multi line text including control characters, like this
But the
\
is escaped and displayed as a\
, I'd like to insert the\0
control character in the string.The text was updated successfully, but these errors were encountered: