Skip to content

🥅💄 Support (monochrome) highlights in parse error details#603

Merged
nevans merged 1 commit intomasterfrom
response_parse_error-detailed_message-highlights
Feb 13, 2026
Merged

🥅💄 Support (monochrome) highlights in parse error details#603
nevans merged 1 commit intomasterfrom
response_parse_error-detailed_message-highlights

Conversation

@nevans
Copy link
Collaborator

@nevans nevans commented Feb 10, 2026

This first version is monochrome: only bold and underline highlights are added. A follow-up PR adds color.

This runs sprintf in two passes: once to apply the escape sequences and again to interpolate variables. This requires %% for the second pass, which can be confusing.

Maybe this approach is too much for the very simple highlighting in this version? But, it seems to work okay for this and extends well to more elaborate color schemes, too. IMO it's easier to read and maintain than a bunch of conditional string appending. IMO, it's simpler than the other templating approaches that I considered.

@nevans nevans added the enhancement New feature or request label Feb 10, 2026
@nevans nevans force-pushed the response_parse_error-detailed_message-highlights branch from f7f580c to e5656a9 Compare February 10, 2026 23:28
This runs sprintf in two passes: once to apply the escape sequences and
again to interpolate variables.  This requires `%%` for the second pass,
which _can_ be confusing.

Maybe this approach is too much for the very simple highlighting in this
version?  But, it seems to work okay for elaborate color schemes, too.
IMO it's easier to read and maintain than a bunch of conditional string
appending.  And it's simpler than the other templating approaches that I
considered.
@nevans nevans force-pushed the response_parse_error-detailed_message-highlights branch from e5656a9 to 8fb7441 Compare February 11, 2026 18:29
@nevans nevans merged commit d6809ff into master Feb 13, 2026
103 of 107 checks passed
@nevans nevans deleted the response_parse_error-detailed_message-highlights branch February 13, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant