-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
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
Preserve comments in YAML/TOML in the Remarshal func #4520
Comments
For JSON, may be use a hack like shown here: https://stackoverflow.com/a/244858/1219634
|
I'm interested in this, it would helpful for readers to view important annotation in place. I have a question is that is it possible preseve the comments and display it in-place? foo:
bar:
fizz: buzz # annotation for fizz. Remarshal to TOML. [foo.bar]
fizz = "buzz" # annotation for fizz. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do some string replacement
"# My comment" => "hugocomment = "My comment" => and back.
Ignore the last step for JSON (which does not support it).
The text was updated successfully, but these errors were encountered: