We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I run this program:
package main import ( "os" "github.com/goccy/go-yaml/parser" ) func main() { input := []byte(`'python script.py | grep "{''ok'': ''pong''}"'`) f, err := parser.ParseBytes(input, 0) if err != nil { panic(err) } _, err = os.Stdout.Write([]byte(f.String())) if err != nil { panic(err) } }
It incorrectly outputs
'python script.py | grep "{'ok': 'pong'}"'
The correct, expected output is the same as the input:
'python script.py | grep "{''ok'': ''pong''}"'
Built with
require github.com/goccy/go-yaml v1.9.3
The text was updated successfully, but these errors were encountered:
Escape single quotes in single-quoted string
df4f943
According to YAML specification, single quotes must be repeated in a single-quoted scalar. https://yaml.org/spec/1.2.2/#732-single-quoted-style Fixes goccy#255
Thank you for the reporting and contribution ! I will check #256
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
When I run this program:
It incorrectly outputs
The correct, expected output is the same as the input:
Built with
The text was updated successfully, but these errors were encountered: