Skip to content
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

Bug with escaped newlines #2

Open
sirian opened this issue Dec 26, 2018 · 2 comments
Open

Bug with escaped newlines #2

sirian opened this issue Dec 26, 2018 · 2 comments

Comments

@sirian
Copy link

sirian commented Dec 26, 2018

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"
@MartinKolarik
Copy link
Owner

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
`

@sirian
Copy link
Author

sirian commented Dec 28, 2018

it's possible to detect via raw value of template strings

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants