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

* string gets rendered with a bang on front #113

Closed
roman opened this issue Jul 13, 2017 · 3 comments
Closed

* string gets rendered with a bang on front #113

roman opened this issue Jul 13, 2017 · 3 comments

Comments

@roman
Copy link

roman commented Jul 13, 2017

Hey Michael,

First of all, thank you for taking the time to read this ticket. I've been using your library to parse YAML files that I want to modify and re-render. I discovered this behavior when doing some template transformations:

λ YAML.encode (JSON.String "*")
"! '*'\n"
it :: ByteString

I'm having some templates that have the value '*' in their fields, and when doing a parsing -> rendering it adds that bang at the beginning of the string. I'm guessing this behavior doesn't come from this library but from the libYAML one. Is there a way to stop this behavior?

snoyberg added a commit that referenced this issue Jul 14, 2017
@snoyberg
Copy link
Owner

Pleasure to read the ticket :)

This one seems pretty easy: just add * to the set of special strings that have explicit quoting rules applied. I've added this in aa7d64b. Would you be able to give that a shot and see if it addresses your problem?

@roman
Copy link
Author

roman commented Jul 15, 2017

Hi @snoyberg,

Impressed by how quickly you addressed this, yup the commit seems does the trick, thank you very much sir.

Closing now.

@roman roman closed this as completed Jul 15, 2017
@snoyberg
Copy link
Owner

snoyberg commented Jul 16, 2017 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