You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jsonnet fmt --string-style s (the single quote option) creates invalid jsonnet if a string has a single quote inside it.
Given a foo.jsonnet:
{
foo: "'bar'",
bar: '\'baz\'',
}
jsonnet fmt --string-style s produces:
$ jsonnet fmt --string-style s foo.jsonnet | tee foo.jsonnet
{
foo: ''bar'',
bar: ''baz'',
}
Which of course is invalid jsonnet:
$ jsonnet foo.jsonnet
STATIC ERROR: foo.jsonnet:2:10-12: Expected a comma before next field.
The text was updated successfully, but these errors were encountered:
brbbs
changed the title
jsonnet fmt --single-space s does not escape single quotes in strings
jsonnet fmt --string-style s does not escape single quotes in strings
May 27, 2016
jsonnet fmt --string-style s
(the single quote option) creates invalid jsonnet if a string has a single quote inside it.Given a foo.jsonnet:
jsonnet fmt --string-style s
produces:Which of course is invalid jsonnet:
The text was updated successfully, but these errors were encountered: