-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
What is the issue with the Console Standard?
The definition of Formatter is recursive: it substitutes the first format specifier and calls itself recursively on the result. This leads to a problem: if the result of substitution itself contains format specifiers, they are also processed.
For example, the developer may assume that the call console.log("(%s, %s)", a, b) would work similarly to console.log(`(${a}, ${b})`). But there is a difference: if (the string form of) a contains a format specifier, it will be applied to b, which is probably not what the developer expected.
This recursive definition also doesn't play well with substituting %% with % (which this specification doesn't prescribe, but which both Chrome and Firefox do).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels