Closed AtkinsSJ closed 1 year ago
Realised another small change I forgot to make, will update this when I'm back at my desk.
New changes: Remove a redundant step from Formatter
, and make the commit message clearer.
Just realised in the shower: Formatter also doesn't handle the case of being called with only 1 arg, which again happens when called from trace()
, group()
and groupCollapsed()
.
New changes: Handle that case in Formatter
.
@domfarolino @robertkowalski @terinjokes can any of you take a look? (@AtkinsSJ just asked on the Matrix channel.)
I can take a look this evening.
@terinjokes Any thoughts on this so far?
LGTM. @domfarolino ?
LGTM. @domfarolino ?
Yep I think this LGTM as well, but I'll defer to you @terinjokes since you got to this first!
Just remembered this PR again, and rebased it on the main branch. Is there anything I still need to do to get verified as a WHATWG participant? I registered for that quite a while ago.
Thanks a lot @AtkinsSJ!
Thanks for the merge! :^)
Hi! This is my first contribution to a spec like this so while I've done my best to follow the guidelines, there are probably things I am getting wrong. Let me know and I'll try and sort them out as soon as possible.
This fixes #204.
As noted in that issue, several functions call
Formatter
without checking that a format specifier is present, but theFormatter
algorithm assumed this was never the case. When called in this way,Formatter
would use theresult
variable without defining it.This patch makes the following changes:
Add a step 4 to the
Formatter
algorithm to explicitly handle a lack of format specifier.Correct the indentation of what was step 3.8 of
Formatter
, so it is now step 6.Remove what was step 4 from
Formatter
, since this is now redundant.Remove step 5 from the
Logger
algorithm, since this is now redundant.Add a new step 1 to
Formatter
, which returns early if only one argument was provided.(See WHATWG Working Mode: Changes for more details.)
Preview | Diff
Preview | Diff