Skip to content

Commit 96fed85

Browse files
committed
minor #12257 Yaml: minor syntax issues and expanded multi-line examples (javiereguiluz)
This PR was merged into the 3.4 branch. Discussion ---------- Yaml: minor syntax issues and expanded multi-line examples Thanks to #12253 (created by @mikemix) I learned about this `>-` syntax ... so I think we should mention it. Commits ------- 79b0c49 Yaml: minor syntax issues and expanded multi-line examples
2 parents 7f1c51d + 79b0c49 commit 96fed85

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

components/yaml/yaml_format.rst

+13-5
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,17 @@ where each line break is replaced by a space:
9494
9595
>
9696
This is a very long sentence
97-
that spans several lines in the YAML
98-
but which will be rendered as a string
99-
without carriage returns.
97+
that spans several lines in the YAML.
98+
99+
# This will be parsed as follows: (notice the trailing \n)
100+
# "This is a very long sentence that spans several lines in the YAML.\n"
101+
102+
>-
103+
This is a very long sentence
104+
that spans several lines in the YAML.
105+
106+
# This will be parsed as follows: (without a trailing \n)
107+
# "This is a very long sentence that spans several lines in the YAML."
100108
101109
.. note::
102110

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

0 commit comments

Comments
 (0)