Skip to content

Commit

Permalink
Rewroded some contents and fixed some lists of elements
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Dec 29, 2014
1 parent 3a40d5a commit 2824867
Showing 1 changed file with 10 additions and 58 deletions.
68 changes: 10 additions & 58 deletions components/yaml/yaml_format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ they can also be unquoted:
"A double-quoted string in YAML"
Quoted styles are useful when a string starts or ends with one or more
relevant spaces, because unquoted strings are trimmed on both ends when parsing
their contents.
Quoted styles are useful when a string starts or end with one or more relevant
spaces, because unquoted strings are trimmed on both end when parsing their
contents. Quotes are required when the string contains special or reserved characters.

When using single-quoted strings, any single quote ``'`` inside its contents
must be doubled to escape it:
Expand All @@ -49,25 +49,8 @@ Strings containing any of the following characters must be quoted. Although you
can use double quotes, for these characters it is more convenient to use single
quotes, which avoids having to escape any backslash ``\``:

* ``:``
* ``{``
* ``}``
* ``[``
* ``]``
* ``,``
* ``&``
* ``*``
* ``#``
* ``?``
* ``|``
* ``-``
* ``<``
* ``>``
* ``=``
* ``!``
* ``%``
* ``@``
* ``\```
* ``:``, ``{``, ``}``, ``[``, ``]``, ``,``, ``&``, ``*``, ``#``, ``?``, ``|``,
``-``, ``<``, ``>``, ``=``, ``!``, ``%``, ``@``, ``\```

The double-quoted style provides a way to express arbitrary strings, by
using ``\`` to escape characters and sequences. For instance, it is very useful
Expand All @@ -80,42 +63,11 @@ when you need to embed a ``\n`` or a Unicode character in a string.
If the string contains any of the following control characters, it must be
escaped with double quotes:

* ``\0``
* ``\x01``
* ``\x02``
* ``\x03``
* ``\x04``
* ``\x05``
* ``\x06``
* ``\a``
* ``\b``
* ``\t``
* ``\n``
* ``\v``
* ``\f``
* ``\r``
* ``\x0e``
* ``\x0f``
* ``\x10``
* ``\x11``
* ``\x12``
* ``\x13``
* ``\x14``
* ``\x15``
* ``\x16``
* ``\x17``
* ``\x18``
* ``\x19``
* ``\x1a``
* ``\e``
* ``\x1c``
* ``\x1d``
* ``\x1e``
* ``\x1f``
* ``\N``
* ``\_``
* ``\L``
* ``\P``
* ``\0``, ``\x01``, ``\x02``, ``\x03``, ``\x04``, ``\x05``, ``\x06``, ``\a``,
``\b``, ``\t``, ``\n``, ``\v``, ``\f``, ``\r``, ``\x0e``, ``\x0f``, ``\x10``,
``\x11``, ``\x12``, ``\x13``, ``\x14``, ``\x15``, ``\x16``, ``\x17``, ``\x18``,
``\x19``, ``\x1a``, ``\e``, ``\x1c``, ``\x1d``, ``\x1e``, ``\x1f``, ``\N``,
``\_``, ``\L``, ``\P``

Finally, there are other cases when the strings must be quoted, no matter if
you're using single or double quotes:
Expand Down

0 comments on commit 2824867

Please sign in to comment.