Skip to content
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

parse_config_file: alternate comment interpretation #100

Open
xloem opened this issue Oct 23, 2020 · 1 comment
Open

parse_config_file: alternate comment interpretation #100

xloem opened this issue Oct 23, 2020 · 1 comment

Comments

@xloem
Copy link

xloem commented Oct 23, 2020

For some time parse_config_file treats all # signs as initiating comments, preventing the use of # signs in values.

It would be very helpful if a simple flag could be set, to only consider # signs in column 0, or preceded only by whitespace, as comments. This would make for clearer, cleaner code and configuration files, when configuration values contain #.

Here's an example of somebody looking for this, and being advised to write an iostreams filter to make it work:
https://stackoverflow.com/questions/31921241/boostprogram-options-how-to-support-hash-character-in-a-value

Here's an example of brute-force key generation implemented in a production release, to make sure the key never contains the # symbol and can be stored in the configuration file:
https://github.com/libbitcoin/libbitcoin-protocol/blob/version3/src/zmq/certificate.cpp#L78

@vprus
Copy link
Collaborator

vprus commented Oct 23, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants