fix: highlight escaped JSON strings correctly - #188
Merged
Merged
Conversation
commit: |
Contributor
|
LGTM |
Contributor
|
| mean | stddev | min | max | |
|---|---|---|---|---|
| PR | 321.0 ms | 6.1 ms | 313.9 ms | 342.2 ms |
| base | 326.4 ms | 12.3 ms | 319.8 ms | 377.3 ms |
Δ (PR vs base): ↓ -5.4 ms (-1.6%)
Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.
NuroDev
marked this pull request as ready for review
October 2, 2026 08:20
NuroDev
enabled auto-merge
October 2, 2026 08:21
Contributor
|
LGTM |
Contributor
|
🤖 I've done a thorough review of your PR. Fixes escaped JSON-string highlighting and adds regression coverage.
|
Contributor
|
LGTM |
Contributor
|
LGTM |
Contributor
|
LGTM |
petebacondarwin
approved these changes
Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #187.
JSON string highlighting currently stops at an escaped quote, leaving the rest of the value unstyled. Consume JSON escape sequences as pairs so the complete string value stays highlighted.
Add regression coverage for escaped quotes, backslashes, Windows paths, and other JSON escapes. Confirm non-TTY and
NO_COLORoutput remains plain, parseable JSON even withFORCE_COLORset. Include a patch changeset.Validated on macOS:
pnpm checkpnpm --filter cf test: 1,425 passedpnpm --filter @cloudflare/wrangler-tests test: 637 passed, with existing skipped and todo cases