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

Add support for tripple quote render #409

Open
tibcoplord opened this issue Jul 14, 2016 · 2 comments
Open

Add support for tripple quote render #409

tibcoplord opened this issue Jul 14, 2016 · 2 comments

Comments

@tibcoplord
Copy link

tibcoplord commented Jul 14, 2016

On parse hocon supports tripple quotes for multi-line strings :

myitem = """line1
line2"""

However when this is rendered it becomes :

myitem = "line1\nline2"

It would be great if the render can ( perhaps optionally ) use tripple quoting as well.

@havocp
Copy link
Collaborator

havocp commented Jul 14, 2016

There is a separate feature (ConfigDocument) that attempts to round trip formatting. Config doesn't know the original formatting so it wouldn't have a way to know to keep triple quotes.

@randombyte-developer
Copy link

randombyte-developer commented Jun 14, 2018

I suggest rendering triple quotes if the string contains at least one quote. This behavior could be always enabled or by some sort of render option, so for the whole file. The original formatting of the specific node doesn't need to be known.

SpongePowered/Configurate#96

@havocp Should I do an attempt for a PR? I would implement it somewhere here.

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

3 participants