-
Notifications
You must be signed in to change notification settings - Fork 327
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
Support for emitting and parsing comments #42
Comments
Hi @Tricertops. I agree with you in principal. libyaml should also have a mode With comments the devil is in the details. Full line comments might be easier I think to move this idea forward, you should add a number of tests to the test The test suite is: [email protected]:yaml/yaml-test-suite |
bump Is that topic still worth researching or is it a WONTFIX? Would it make sense to establish a more exhaustive list of what's needed to get |
I leave my upvote for this feature. |
Currently, there is no way to write or read comments using this library.
I understand that comments are intended only for humans, so parsing them into runtime model makes little sense. However, there might be a valid case when some runtime model is written to a file that will be read by humans. Imagine an auto-generated configuration file annotated with comments for further human editing.
This would also allow editing files using this lib without losing human-created coments (even if the exact formatting would be lost).
Supporting comments would probably require these new public APIs:
YAML_COMMENT_TOKEN
in enumyaml_token_type_t
YAML_COMMENT_EVENT
in enumyaml_event_type_t
yaml_comment_event_initialize(yaml_event_t *event, yaml_char_t *content)
The text was updated successfully, but these errors were encountered: