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

[YAML] the YAML documentation should list the YAML special chars #4197

Closed
stof opened this issue Sep 3, 2014 · 1 comment
Closed

[YAML] the YAML documentation should list the YAML special chars #4197

stof opened this issue Sep 3, 2014 · 1 comment
Labels
actionable Clear and specific issues ready for anyone to take them. hasPR A Pull Request has already been submitted for this issue.

Comments

@stof
Copy link
Member

stof commented Sep 3, 2014

YAML has a bunch of special chars requiring to use quoted values instead of unquoted values when they appear in it.
However, the doc at http://symfony.com/doc/current/components/yaml/yaml_format.html does not describe them currently (and the YAML spec is rather complex to understand because of the way it is written)

the logic used by the dumper to know whether the escaping is necessary is available in the code:

The fact that people don't know about special chars is causing issues when one of them is parsed as a string value only because of a bug in the parser, as this breaks your file once the parser gets fixed (or when parsing it with a different parser than the Symfony one). See symfony/symfony#11835 for an example

@javiereguiluz
Copy link
Member

I had some problems fixing this documentation. @stof if you have some time, please review the related PR: #4650 Thanks!

@wouterj wouterj added the hasPR A Pull Request has already been submitted for this issue. label Dec 15, 2014
weaverryan added a commit that referenced this issue Jan 3, 2015
…string (javiereguiluz)

This PR was merged into the 2.3 branch.

Discussion
----------

Documented the characters that provoke a YAML escaping string

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | yes
| Applies to    | all
| Fixed tickets | #4197

Commits
-------

2824867 Rewroded some contents and fixed some lists of elements
3a40d5a MAde some tweaks suggested by Wouter
044e88b Fixed a minor typo
63ea659 Added a lot more cases for enclosing strings with quotes
ce6e3eb Reworded some explanations to make them more clear
caaa272 Addressed all the comments made by Wouter
d5be25e Documented the characters that provoke a YAML escaping string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable Clear and specific issues ready for anyone to take them. hasPR A Pull Request has already been submitted for this issue.
Projects
None yet
Development

No branches or pull requests

4 participants