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
stripIndent
not stripping 1st line of variables
#208
Comments
I had the same issue too, but I was able to get around it.
And I expected it to return (no leading whitespace):
But instead it was returning this (leading whitespace on line 2):
The problem was that
I solved the problem by first stripping the header text, then concat the json after:
|
I have this line of code:
but, the 1st line of variables that contain their line break and indent not stripped at 1st line, it takes the 8 spaces indent from the code. (sorry if the description not very descriptive or hard to understand)
the result is like this:
console.log(JSON.stringify(meta, null, 2))
:console.log(stack)
:but this is the result of the
stripIndent
of them:notice the difference. Their 1st line not stripped. They take 8 spaces, same as the code.
The text was updated successfully, but these errors were encountered: