dedent-js
dedent-js copied to clipboard
Bug with escaped newlines
dedent`foo\n bar`
is not the same as
dedent`foo
bar`
But both produces "foo\nbar"
dedent`foo\n bar` should be "foo\n bar"
This is in line with the test suite and readme. IIRC it wasn't possible to detect the difference. You can write it like this though:
dedent`
foo
bar
`
it's possible to detect via raw
value of template strings