From ea60bdc435e2c9b54195d4953ddc97e69e15a2e7 Mon Sep 17 00:00:00 2001 From: Alexis Lefebvre Date: Mon, 12 Aug 2024 14:09:12 +0200 Subject: [PATCH] fix: format code samples --- src/Autocomplete/doc/index.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Autocomplete/doc/index.rst b/src/Autocomplete/doc/index.rst index 82f3ac64849..118443cb073 100644 --- a/src/Autocomplete/doc/index.rst +++ b/src/Autocomplete/doc/index.rst @@ -292,11 +292,11 @@ based on the current form data are not possible by default. To partially avoid t .. warning:: - Only scalar values (`string`, `integer`, `float`, `boolean`), `null` and `arrays` (consisted from the same types as mentioned before) can be passed as extra options. + Only scalar values (``string``, ``integer``, ``float``, ``boolean``), ``null`` and ``array``s (consisted from the same types as mentioned before) can be passed as extra options. -Considering the following example, when the form type is rendered for the first time, it will use the `query_builder` defined -while adding a `food` field to the `FoodForm`. However, when the Ajax is used to fetch the results, on the consequent renders, -the default `query_builder` will be used:: +Considering the following example, when the form type is rendered for the first time, it will use the ``query_builder`` defined +while adding a ``food`` field to the ``FoodForm``. However, when the Ajax is used to fetch the results, on the consequent renders, +the default ``query_builder`` will be used:: // src/Form/FoodForm.php // ... @@ -323,8 +323,8 @@ the default `query_builder` will be used:: } If some food can be consisted of other foods, we might want to exclude the "root" food from the list of available foods. -To achieve this, we can remove the `query_builder` option from the above example and pass the `excluded_foods` extra option -to the `FoodAutocompleteField`:: +To achieve this, we can remove the ``query_builder`` option from the above example and pass the ``excluded_foods`` extra option +to the ``FoodAutocompleteField``:: // src/Form/FoodForm.php // ... @@ -345,8 +345,8 @@ to the `FoodAutocompleteField`:: } } -The magic of the `extra_options` is that it will be passed to the `FoodAutocompleteField` every time an Ajax call is made. -So now, we can just use the `excluded_foods` extra option in the default `query_builder` of the `FoodAutocompleteField`:: +The magic of the ``extra_options`` is that it will be passed to the ``FoodAutocompleteField`` every time an Ajax call is made. +So now, we can just use the ``excluded_foods`` extra option in the default ``query_builder`` of the ``FoodAutocompleteField``:: // src/Form/FoodAutocompleteField.php // ... @@ -602,7 +602,7 @@ If you need to pass extra options to the autocompleter, you can do so by impleme .. tip:: - If you want to know **why** you might need to use the `extra options` feature, see :ref:`passing-extra-options-to-the-ajax-powered-autocomplete`. + If you want to know **why** you might need to use the ``extra_options`` feature, see :ref:`passing-extra-options-to-the-ajax-powered-autocomplete`. .. code-block:: diff