Configurate icon indicating copy to clipboard operation
Configurate copied to clipboard

Preserve multiline strings

Open randombyte-developer opened this issue 7 years ago • 4 comments
trafficstars

Like in Python you can do:

node1="""Just a string "with" quotes!"""

as described here: https://github.com/lightbend/config/blob/master/HOCON.md#multi-line-strings

Configurate reads it correctly but always saves it back as followed:

node1="Just a string \"with\" quotes!"

I suggest there should be some type of option to enable triple quotes for strings that contain a least one " quote.

randombyte-developer avatar Jun 13 '18 14:06 randombyte-developer

Any chance that Sponge forks the typesafe repo to fix things like that?

randombyte-developer avatar Jun 19 '18 20:06 randombyte-developer

Any chance that Sponge forks the typesafe repo to fix things like that?

I would rather not as maintaining yet another library is something I'm not sure we have the man power to provide.

gabizou avatar Jun 19 '18 21:06 gabizou

On top of which, Given the under-specification of Hocon, I'd be reluctant to fork the current reference implementation.

Configurate probably needs to change to adapt to the new API's provided since it was written, for modifying values in place, and controlling their formatting.

Duplicate of: https://github.com/lightbend/config/issues/409

ryantheleach avatar Jun 20 '18 01:06 ryantheleach

Couldn't this be implemented with Mixins somewhere here: https://github.com/lightbend/config/blob/ea45ea3767a201933eeeb9c3f0f13eacc9b51f07/config/src/main/java/com/typesafe/config/impl/ConfigString.java#L82

randombyte-developer avatar Sep 14 '18 19:09 randombyte-developer