Skip to content

Commit 22aca54

Browse files
committed
minor #238 [Doc] Improve RST syntax of some contents (javiereguiluz)
This PR was merged into the 2.x branch. Discussion ---------- [Doc] Improve RST syntax of some contents | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Tickets | - | License | MIT Commits ------- 80e4fd5 [Doc] Improve RST syntax of some contents
2 parents 3a3dbb1 + 80e4fd5 commit 22aca54

File tree

4 files changed

+30
-22
lines changed

4 files changed

+30
-22
lines changed

src/LazyImage/Resources/doc/index.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ There is also support for the ``srcset`` attribute by passing an
6969
}) }}
7070
/>
7171
72-
**Note** The ``stimulus_controller()`` function comes from
73-
`WebpackEncoreBundle v1.10`_.
72+
.. note::
73+
74+
The ``stimulus_controller()`` function comes from `WebpackEncoreBundle v1.10`_.
7475

7576
Instead of using a generated thumbnail that would exist on your
7677
filesystem, you can use the BlurHash algorithm to create a light,

src/LiveComponent/src/Resources/doc/index.rst

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -968,10 +968,12 @@ Now, when the form is submitted, it will execute the ``save()`` method
968968
via Ajax. If the form fails validation, it will re-render with the
969969
errors. And if it's successful, it will redirect.
970970

971-
**NOTE**: Make sure that each time the user changes a field, you update
972-
the component's model. If you don't do this, when you trigger the
973-
action, it will *not* contain the form's data because the data in the
974-
fields and the component's data will be out of sync.
971+
.. note::
972+
973+
Make sure that each time the user changes a field, you update the
974+
component's model. If you don't do this, when you trigger the action, it
975+
will *not* contain the form's data because the data in the fields and the
976+
component's data will be out of sync.
975977

976978
An easy way to accomplish this (explained more in the :ref:`Forms <forms>`
977979
section above) is to add:
@@ -1064,8 +1066,10 @@ property.
10641066
Validation (without a Form)
10651067
~~~~~~~~~~~~~~~~~~~~~~~~~~~
10661068

1067-
**NOTE** If your component :ref:`contains a form <forms>`, then validation
1068-
is built-in automatically. Follow those docs for more details.
1069+
.. note::
1070+
1071+
If your component :ref:`contains a form <forms>`, then validation
1072+
is built-in automatically. Follow those docs for more details.
10691073

10701074
If you're building some sort of form *without* using Symfony's form
10711075
component, you *can* still validate your data.
@@ -1328,9 +1332,11 @@ Thanks to the ``data-model-map``, whenever the ``markdown_value`` model
13281332
updates in the child component, the ``post.content`` model will be
13291333
updated in the parent component.
13301334

1331-
**NOTE**: If you *change* a ``LiveProp`` of a child component on the
1332-
server (e.g. during re-rendering or via an action), that change will
1333-
*not* be reflected on any parent components that share that model.
1335+
.. note::
1336+
1337+
If you *change* a ``LiveProp`` of a child component on the server
1338+
(e.g. during re-rendering or via an action), that change will
1339+
*not* be reflected on any parent components that share that model.
13341340

13351341
Full Embedded Component Example
13361342
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/Swup/Resources/doc/index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ initialize Swup:
5858
</body>
5959
</html>
6060
61-
**Note** The ``stimulus_controller()`` function comes from
62-
`WebpackEncoreBundle v1.10`_.
61+
.. note::
62+
63+
The ``stimulus_controller()`` function comes from `WebpackEncoreBundle v1.10`_.
6364

6465
That's it! Swup now reacts to a link click and run the default fade-in
6566
transition.
@@ -180,11 +181,10 @@ Then in your template, add your controller to the HTML attribute:
180181
</body>
181182
</html>
182183
183-
..
184+
.. note::
184185

185-
**Note**: be careful to add your controller **before** the Swup
186-
controller so that it is executed before and can listen on the
187-
``swup:connect`` event properly.
186+
Be careful to add your controller **before** the Swup controller so that it
187+
is executed before and can listen on the ``swup:connect`` event properly.
188188

189189
Backward Compatibility promise
190190
------------------------------

src/TwigComponent/src/Resources/doc/index.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,12 @@ need to populate, you can render it with:
312312
313313
{{ component('featured_products') }}
314314
315-
**NOTE** Because components are services, normal dependency injection
316-
can be used. However, each component service is registered with
317-
``shared: false``. That means that you can safely render the same
318-
component multiple times with different data because each component will
319-
be an independent instance.
315+
.. note::
316+
317+
Because components are services, normal dependency injection can be used.
318+
However, each component service is registered with ``shared: false``. That
319+
means that you can safely render the same component multiple times with
320+
different data because each component will be an independent instance.
320321

321322
Computed Properties
322323
~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)