You can clone with
No one assigned
not sure if I like console.log formatting "%d" and such, since browsers don't do it ... but worse, there is no way to escape it
var formatRegExp = /%[sdj]/g;
should be something like
var formatRegExp = /%[%sdj]/g;
and "%%" should become one "%" in the replace function ... or the escaping should be left alone if there are no arguments to match it
but anyway you slice it, if you print % signs to console.log browser behavior will differ from nodejs behavior
We should support %% to escape it. That's definitely a bug.
Just because it isn't done in a browser isn't a good reason to get rid of something. Changing this would also break a large percentage of code already out there.
I agree it is likely too late now, and who prints stuff to the browser log that is supposed to be meaningfully parsed later ... But still, taking an existing and known API and changing it slightly in semantics is something best avoided. But that is just an opinion.
Add %% escape to util.format()
+1. Can I merge 83d17f6?
@bnoordhuis - Thanks!