-
Notifications
You must be signed in to change notification settings - Fork 948
% symbol in object interpreted as formatter #766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Reproduced; this is very clearly a bug. Sorry you're hitting it - I'm surprised it's not been brought up before. Thank you for the reproduction steps. PR is welcome, else I will try to find time within the next week to get to it. |
Super weird. Just investigated a bit more to make sure this wasn't introduced recently (it wasn't, it exists pre-4.x). It appears, for whatever reason, the If you would like to work around this, insert another const debug = require('debug')('foo');
debug.enabled = true // Or use ENV variables
const someObjectIWantToLog = { "%j": "%j %j %%" }
debug("%o", "%o", someObjectIWantToLog, 1, 2, 3)
debug("%o", "%o", { "%j": "%j %j %%" })
debug("%o", "%o", { "%j": "%j %j %%" })
debug("%o", "%o", { "%j": "%j %j %%" })
debug("%o", "%o", { "%j": "%j %j %%" })
|
This comment has been minimized.
This comment has been minimized.
@qix FWIW EJS templates (which use |
2.6.8 |
4.3.4 |
Uh oh!
There was an error while loading. Please reload this page.
result:
expected result:
This gets even weirder when running the following several times:
result:
Did I miss something in the doc? Is there a way not to interpret those
%
symbols? Or is this a bug?The text was updated successfully, but these errors were encountered: