Extra space at the beginning of console.log

As of a recent update, Chrome seems to insert spaces at the beginning of every exit console.log

. This code:

console.log("one");
console.log("two\nthree");
console.log("four");

      

... is used to give me this expected output when launching Chrome, where all lines are on the left edge:

enter image description here

Text version:

one
two
three
four

... but as of a fairly recent Chrome update (I don't know the exact version where it was launched, but this has been happening since v39.0.2171.95) console.log

, it seems to insert a space at the beginning of every line you ask for output:

enter image description here

Text version:

 one
 two
three
 four

Note that three

it is not indented because it is part of the same line as two

, just preceded by a newline .

Live Copy

Does anyone know why this would be and how to get it to stop inserting those spaces? Is this a Chrome bug? (I don't see on the list of problems , but ...)

+3


source to share


1 answer


At first I thought it was a Linux / Windows case, but it was only due to the fact that my copy of Chrome from Chrome was out of date (v38.0.2125.111). When I updated my Linux box, there was an error there too, so apparently this is not some kind of setting (I was wondering about some kind of prefix function, for example - but if so, then it is a new really strange value default). So this is a new bug, having introduced some time between them and v39.0.2171.95. I reported this .


And in fact, they've already answered, identified when the regression occurred, and started fixing it. Gosh.

+2


source







All Articles