Skip to content

Commit 56d0815

Browse files
committed
Minor tweaks
1 parent c08e4e8 commit 56d0815

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

reference/twig_reference.rst

+14-8
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ yaml_encode
485485

486486
Transforms the input into YAML syntax.
487487

488-
The ``inline`` argument is the level where you switch to inline YAML:
488+
The ``inline`` argument is the level where the generated output switches to inline YAML:
489489

490490
.. code-block:: twig
491491
@@ -499,12 +499,15 @@ The ``inline`` argument is the level where you switch to inline YAML:
499499
} %}
500500
501501
{{ array|yaml_encode(inline = 0) }}
502-
{# output: { a: { c: e }, b: { d: f } } #}
502+
{# output:
503+
{ a: { c: e }, b: { d: f } } #}
503504
504505
{{ array|yaml_encode(inline = 1) }}
505-
{# output: a: { c: e } b: { d: f } #}
506+
{# output:
507+
a: { c: e }
508+
b: { d: f } #}
506509
507-
The ``dumpObjects`` argument is used to dump objects::
510+
The ``dumpObjects`` argument enables the dumping of PHP objects::
508511

509512
// ...
510513
$object = new \stdClass();
@@ -538,7 +541,7 @@ yaml_dump
538541
Does the same as `yaml_encode() <yaml_encode>`_, but includes the type in
539542
the output.
540543

541-
The ``inline`` argument is the level where you switch to inline YAML:
544+
The ``inline`` argument is the level where the generated output switches to inline YAML:
542545

543546
.. code-block:: twig
544547
@@ -552,12 +555,15 @@ The ``inline`` argument is the level where you switch to inline YAML:
552555
} %}
553556
554557
{{ array|yaml_dump(inline = 0) }}
555-
{# output: %array% { a: { c: e }, b: { d: f } } #}
558+
{# output:
559+
%array% { a: { c: e }, b: { d: f } } #}
556560
557561
{{ array|yaml_dump(inline = 1) }}
558-
{# output: %array% a: { c: e } b: { d: f } #}
562+
{# output:
563+
%array% a: { c: e }
564+
b: { d: f } #}
559565
560-
The ``dumpObjects`` argument is used to dump objects::
566+
The ``dumpObjects`` argument enables the dumping of PHP objects::
561567

562568
// ...
563569
$object = new \stdClass();

0 commit comments

Comments
 (0)