Repository navigation
v0.2.0
v0.2.0
Aligns Parse with the spec rev 0.4 Limits rule and makes rejections diagnosable.
Breaking changes
Parsereturns(Report, error)instead of(Report, bool). Replaceokwitherr == nil. Errors wrapErrNoState,ErrUnknownState,ErrLimit,ErrInvalidIDorErrInvalidText(test witherrors.Is) and name the failing field, e.g.osc7501: limit exceeded: app is 33 bytes, max 32.- Reports breaking a limit are discarded whole. Previously accepted, now rejected:
- keys over 16 bytes
appover 32 bytes- an invalid or oversized
id,app,titleormsgfollowed by a valid duplicate - bodies that cannot fit in a 4096-byte sequence
Unchanged
Scanner.OnReportfires only for accepted reports; rejected reports are dropped silently.- An
appwith invalid characters (within 32 bytes) is still treated as absent.
Thanks to @dannymidnight for the report in buildkite/terminal-to-html#289.