Skip to content

Yaml: minor syntax issues and expanded multi-line examples #12257

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

Merged
merged 1 commit into from
Sep 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions components/yaml/yaml_format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,17 @@ where each line break is replaced by a space:

>
This is a very long sentence
that spans several lines in the YAML
but which will be rendered as a string
without carriage returns.
that spans several lines in the YAML.

# This will be parsed as follows: (notice the trailing \n)
# "This is a very long sentence that spans several lines in the YAML.\n"

>-
This is a very long sentence
that spans several lines in the YAML.

# This will be parsed as follows: (without a trailing \n)
# "This is a very long sentence that spans several lines in the YAML."

.. note::

Expand Down Expand Up @@ -322,8 +330,8 @@ The following YAML features are not supported by the Symfony Yaml component:
* Multi-documents (``---`` and ``...`` markers);
* Complex mapping keys and complex values starting with ``?``;
* Tagged values as keys;
* The following tags and types: `!!set`, `!!omap`, `!!pairs`, `!!seq`,
`!!bool`, `!!int`, `!!merge`, `!!null`, `!!timestamp`, `!!value`, `!!yaml`;
* The following tags and types: ``!!set``, ``!!omap``, ``!!pairs``, ``!!seq``,
``!!bool``, ``!!int``, ``!!merge``, ``!!null``, ``!!timestamp``, ``!!value``, ``!!yaml``;
* Tags (``TAG`` directive; example: ``%TAG ! tag:example.com,2000:app/``)
and tag references (example: ``!<tag:example.com,2000:app/foo>``);
* Using sequence-like syntax for mapping elements (example: ``{foo, bar}``; use
Expand Down