You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran this code in NodeJS console using npm version "^1.2.3"
var wrap = require('word-wrap');
var test = '1234 12345678';
var arguments = {width: 10, indent: ' ', newline: ' \n'};
var result = wrap(test, arguments);
result
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.
The text was updated successfully, but these errors were encountered:
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)
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.
The text was updated successfully, but these errors were encountered: