Skip to content

Commit 8b2afdc

Browse files
committed
minor #1977 [Doc] Minor syntax fixes in the Twig component docs (javiereguiluz)
This PR was merged into the 2.x branch. Discussion ---------- [Doc] Minor syntax fixes in the Twig component docs | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | - | License | MIT Commits ------- 1efbcbd [Doc] Minor syntax fixes in the Twig component docs
2 parents f715061 + 1efbcbd commit 8b2afdc

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

Diff for: src/TwigComponent/doc/index.rst

+11-8
Original file line numberDiff line numberDiff line change
@@ -483,17 +483,20 @@ component use a ``PreMount`` hook::
483483

484484
.. note::
485485

486-
In its default configuration, the OptionsResolver treats all props.
487-
However, if more props are passed than the options defined in the OptionsResolver, an error will be prompted, indicating that one or more options do not exist.
488-
To avoid this, use the `ignoreUndefined()` method with `true`. See `ignore not defined options`_ for more info.
486+
In its default configuration, the OptionsResolver treats all props.
487+
However, if more props are passed than the options defined in the OptionsResolver,
488+
an error will be prompted, indicating that one or more options do not exist.
489+
To avoid this, use the ``ignoreUndefined()`` method with ``true``.
490+
See `ignore not defined options`_ for more info::
489491
490-
$resolver->setIgnoreUndefined(true);
492+
$resolver->setIgnoreUndefined(true);
491493
492-
The major drawback of this configuration is that the OptionsResolver will remove every non-defined option when resolving data.
493-
To maintain props that have not been defined within the OptionsResolver, combine the data from the hook with the resolved data.
494+
The major drawback of this configuration is that the OptionsResolver will
495+
remove every non-defined option when resolving data. To maintain props that
496+
have not been defined within the OptionsResolver, combine the data from the
497+
hook with the resolved data::
494498
495-
return $resolver->resolve($data) + $data;
496-
499+
return $resolver->resolve($data) + $data;
497500

498501
The data returned from ``preMount()`` will be used as the props for mounting.
499502

0 commit comments

Comments
 (0)