Skip to content

Commit 9d1fbf5

Browse files
committed
minor #1633 Fix typo on only and without methods documentation (JeanDavidDaviet)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- Fix typo on only and without methods documentation | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | | License | MIT There are two typos in the `only` and `without` examples. The intermediate representation still have the style and the classes attributes respectively. Commits ------- dcfcbd7 Fix typo on only and without methods documentation
2 parents ad37000 + dcfcbd7 commit 9d1fbf5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/TwigComponent/doc/index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,14 +1025,14 @@ Extract specific attributes and discard the rest:
10251025

10261026
.. code-block:: html+twig
10271027

1028+
{# render component #}
1029+
{{ component('MyComponent', { class: 'foo', style: 'color:red' }) }}
1030+
10281031
{# templates/components/MyComponent.html.twig #}
10291032
<div{{ attributes.only('class') }}>
10301033
My Component!
10311034
</div>
10321035

1033-
{# render component #}
1034-
{{ component('MyComponent', { class: 'foo', style: 'color:red' }) }}
1035-
10361036
{# renders as: #}
10371037
<div class="foo">
10381038
My Component!
@@ -1045,14 +1045,14 @@ Exclude specific attributes:
10451045

10461046
.. code-block:: html+twig
10471047

1048+
{# render component #}
1049+
{{ component('MyComponent', { class: 'foo', style: 'color:red' }) }}
1050+
10481051
{# templates/components/MyComponent.html.twig #}
10491052
<div{{ attributes.without('class') }}>
10501053
My Component!
10511054
</div>
10521055

1053-
{# render component #}
1054-
{{ component('MyComponent', { class: 'foo', style: 'color:red' }) }}
1055-
10561056
{# renders as: #}
10571057
<div style="color:red">
10581058
My Component!

0 commit comments

Comments
 (0)