-
Notifications
You must be signed in to change notification settings - Fork 369
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
Preserving comments #35
Comments
Not with the current implementation, and this is by design. Please check the (fine) documentation, section 2.10: |
This would be very hard to implement since comments can appear virtually anywhere in the configuration. I did consider some limited support for saving any comment that appeared directly before a setting, by attaching its text to the setting itself. So effectively every setting would have a "comment" property. |
Just extend the config_setting_t structure to have "comment" property. At the moment Iam using the lib like this to save comments which is ugly way: |
how can i add a comment when writing? |
When I write a configuration to disk using "void writeFile(const char *filename);" comments are not preserved. This is a problem, because I'd like to edit files both with a text editor and libconfig (from a C++ program).
Is it possible to preserve comments?
The text was updated successfully, but these errors were encountered: