Improve error message truncation with closing delimiters (#3478)

Truncated strings now show closing delimiters: `..."` for strings,
`...]` for arrays, and `...}` for objects, making error messages
clearer.
This commit is contained in:
itchyny authored and GitHub committed 2026-02-25 08:14:23 +09:00
1 parent a2741ee0a8
commit 22361cfb87
9 files changed
+88 -72

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@
# invalid base64 characters (whitespace)
. | try @base64d catch .
"Not base64 data"
"string (\"Not base64...) is not valid base64 data"
"string (\"Not base64 data\") is not valid base64 data"
# invalid base64 (too many bytes, QUJD = "ABCD"
. | try @base64d catch .