-
Notifications
You must be signed in to change notification settings - Fork 14
Support multiline configuration values #63
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
Conversation
089a67c to
0fd1922
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm impressed with how small the parser/grammar part of the change turned out to be.
The tests are very minimalistic and there's a newline character at the beginning of the value that might be worth stripping off but otherwise, this looks less intrusive than the escaped value support change was.
15ccbaf to
246404b
Compare
|
There was some discussion of newline handling in the EEP for it https://www.erlang.org/eeps/eep-0064#leading-and-trailing-newline Stripping exactly one leading and trailing newline seems reasonable to me but I don't have strong feelings either way |
be5a545 to
33596a4
Compare
|
@the-mikedavis I decided to implement stripping leading/trailing newlines and |
Fixes #60 Multiline values will be configured using typical "here document" syntax: ``` a.b = ''' l0 l1 l2 ''' ``` All leading and trailing \n and \r in multiline values are trimmed. * Add support for single-quote delimited multiline here-documents * Fix match assertion to take win32 into account * Add multiline_empty_test * Add test for `value` multiline case. * Normalize newlines prior to match in tests for win32 systems. * Add test for multiline values that contain "special" characters. * Add test for unclosed here-document. * Add test for embedded `'''` which is a syntax error. * Add test for multiple here-documents in a conf file. * Add test that mixes simple and multiline values. * Add test with whitespace-only here-document. * Add test where here-document includes `#include` statements. * Add test when file does not end with newline. * Document syntax in README * Add here-document test with unicode.
33596a4 to
c74c263
Compare
|
Given how this feature will be used (e.g. for specifying LDAP queries "inline" in It will be more problematic for x.509 certificates where newlines can wreck parsing with very obscure errors elsewhere. @lukebakken @the-mikedavis I think dealing with the newline is something that can be handled by two different data types without any further parser changes:
This is the approach we have taken for tweaking how encrypted values are parsed, except that there we did not end up with one value but rather replaced one possible implementation with another over time to support values with certain characters in the middle. |
|
I have pushed a small fixture file update… in part because I can :D |
Added entry for multiline string support in v3.6.0.
The cuttlefish project recently added support for multiline values. The primary motivation for this is so that LDAP settings like `vhost_access_query` could now be expressed in `rabbitmq.conf`, rather than requiring `advanced.config`. These changes require cuttlefish version `3.6.0` or later. References: * Kyorai/cuttlefish#60 * Kyorai/cuttlefish#63
The cuttlefish project recently added support for multiline values. The primary motivation for this is so that LDAP settings like `vhost_access_query` could now be expressed in `rabbitmq.conf`, rather than requiring `advanced.config`. These changes require cuttlefish version `3.6.0` or later. References: * Kyorai/cuttlefish#60 * Kyorai/cuttlefish#63
The cuttlefish project recently added support for multiline values. The primary motivation for this is so that LDAP settings like `vhost_access_query` could now be expressed in `rabbitmq.conf`, rather than requiring `advanced.config`. These changes require cuttlefish version `3.6.0` or later. References: * Kyorai/cuttlefish#60 * Kyorai/cuttlefish#63
The cuttlefish project recently added support for multiline values. The primary motivation for this is so that LDAP settings like `vhost_access_query` could now be expressed in `rabbitmq.conf`, rather than requiring `advanced.config`. These changes require cuttlefish version `3.6.0` or later. References: * Kyorai/cuttlefish#60 * Kyorai/cuttlefish#63
The cuttlefish project recently added support for multiline values. The primary motivation for this is so that LDAP settings like `vhost_access_query` could now be expressed in `rabbitmq.conf`, rather than requiring `advanced.config`. These changes require cuttlefish version `3.6.0` or later. References: * Kyorai/cuttlefish#60 * Kyorai/cuttlefish#63
The cuttlefish project recently added support for multiline values. The primary motivation for this is so that LDAP settings like `vhost_access_query` could now be expressed in `rabbitmq.conf`, rather than requiring `advanced.config`. These changes require cuttlefish version `3.6.0` or later. References: * Kyorai/cuttlefish#60 * Kyorai/cuttlefish#63
The cuttlefish project recently added support for multiline values. The primary motivation for this is so that LDAP settings like `vhost_access_query` could now be expressed in `rabbitmq.conf`, rather than requiring `advanced.config`. These changes require cuttlefish version `3.6.0` or later. References: * Kyorai/cuttlefish#60 * Kyorai/cuttlefish#63
The cuttlefish project recently added support for multiline values. The primary motivation for this is so that LDAP settings like `vhost_access_query` could now be expressed in `rabbitmq.conf`, rather than requiring `advanced.config`. These changes require cuttlefish version `3.6.0` or later. References: * Kyorai/cuttlefish#60 * Kyorai/cuttlefish#63 (cherry picked from commit 813617a)
Fixes #60
Multiline values will be configured using typical "here document" syntax: