Open geozak opened 7 years ago
you're defining the newline with a leading space, it seems like the output is correct, since -\n
would be appended to 1234-
(also using -
to represent a space)
Ah, so the space is considered part of the preceding string.
What about the lack of leading indent for the second line?
In index.js line 19 var newline = options.newline || '\n' + indent;
when options.newline is used the indent is not appended.
I ran this code in NodeJS console using npm version "^1.2.3"
In the following I will use '-' to represent a space.
I expected result to output
-1234-\n-12345678
however the output of result was-1234--\n12345678
.Can someone explain why result has more and less spaces than I expected or confirm that this is a bug.
Thanks.