truffle
a51671c522
fix(strings): don't halve backslashes in interpolated string literals
...
String literals in expressions have their escapes decoded once by the lexer
(processEscapeCharacters), then interpolate() decoded every backslash pair a
second time, halving runs of backslashes (\\ -> \, \\\\ -> \\). Output
from an expression diverged from the same string read as input, and from jq.
interpolate() only needs to treat a backslash pair as an escape when it guards
an interpolation paren (\\( -> literal \(); a standalone pair must pass
through unchanged. Guard the skip on a following '(' so plain backslash runs
survive, mirroring the lexer's own \\( special case.
Fixes #2561
2026-06-26 03:13:39 +00:00
Copilot
7d8d3ab902
Replace gopkg.in/op/go-logging.v1 with log/slog ( #2635 )
...
* Initial plan
* Replace gopkg.in/op/go-logging.v1 with log/slog
Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>
Agent-Logs-Url: https://github.com/mikefarah/yq/sessions/aa9c12f4-21b9-4633-9868-6b56585b247f
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com>
2026-03-26 20:41:54 +11:00
Mike Farah
20b5129120
Updating golanglint
2025-05-03 16:34:21 +10:00
Mike Farah
28646c7b50
Skip and warn when interpolating strings and theres a unclosed bracket #2083
2024-06-29 15:20:07 +10:00
Matt Benson
b54d7eb21c
handle escaped backslashes ( #1997 )
2024-04-14 18:52:08 +10:00
Mike Farah
e092329bf3
String interpolation! #1149
2024-03-05 14:10:12 +11:00
Mike Farah
72a78472af
Added tostring #72
2024-03-05 10:40:55 +11:00
Mike Farah
3c3f1180d9
Cleaning up log message formats
2024-02-16 09:44:22 +11:00
Mike Farah
010750daf6
Updated to latest golint
2024-01-11 13:17:34 +11:00
Mike Farah
13d1bbb45f
Generic ast ( #1829 )
...
Remove dependency on yaml.Node for internal AST representation. Yaml decoder is now just another decoder.
2023-10-18 12:11:53 +11:00
Mike Farah
e02bb71948
Fixed parsing of newline character in string expression #1430
2022-11-14 16:40:59 +11:00
Mike Farah
a696dceea4
Added string trim operator
2022-08-08 13:35:57 +10:00
Mike Farah
d7b158f855
Added string case operators
2022-02-22 16:17:23 +11:00
Mike Farah
71706af3d4
String op can now run on custom types
2022-02-22 14:50:45 +11:00
Mike Farah
fc447b46ce
Fixed bad cature groups with multiple matches #1114
2022-02-20 13:28:13 +11:00
Mike Farah
26356ff4be
Added github action fix for parsing xml, updated linter
2022-02-07 11:55:55 +11:00
Matthieu MOREL
59752fb36d
enable more linters ( #1043 )
...
* enable revive linter
* enable gochecknoinits linter
* enable unconvert linter
* enable unparam linter
* enable asciicheck linter
* enable depguard linter
* enable nakedret linter
* enable megacheck linter
* enable nolintlint linter
* enable predeclared linter
* Update go.yml
* Update go.yml
2021-12-21 09:30:08 +11:00
Mike Farah
b44fecdfa5
Added key operator
2021-11-24 09:57:35 +11:00
Mike Farah
5c0a5bd9d3
Added capture regex operator
2021-07-11 11:08:18 +10:00
Mike Farah
b9d01f1e95
Added test operator
2021-07-09 15:54:56 +10:00
Mike Farah
69c45ff64a
Added match operator
2021-07-09 15:33:41 +10:00
Mike Farah
573618e4ce
(wip) regex match op
2021-07-09 14:58:31 +10:00
Mike Farah
cc7ea83506
(wip) regex match op
2021-07-09 14:58:31 +10:00
Mike Farah
0b71a40797
Fixing readonly ops not to modify context when paths dont exist
2021-05-16 14:17:13 +10:00
Mike Farah
3f51a44596
Fixing readonly ops not to modify context when paths dont exist
2021-05-16 14:00:30 +10:00
Mike Farah
b2a538bdfc
Better string sub documentation
2021-04-16 16:07:40 +10:00
Mike Farah
daf0bfe1b9
Added string substitute command
2021-04-15 16:09:47 +10:00
Mike Farah
c6efd5519b
Pass context through operators
...
Allows more sophisticated functionality
2021-02-11 10:58:40 +11:00
Mike Farah
62acee54c3
Added split string operator
2021-02-11 10:58:40 +11:00
Mike Farah
d21c94cf4f
Added join strings operator
2021-02-11 10:58:40 +11:00