Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add details to html_classes function #3988

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/functions/html_classes.rst
Expand Up @@ -12,6 +12,14 @@ names together:
'pending': object.pending,
}) }}">How are you doing?</p>

For this example, knowing that object.errored and object.pending are true, this will render:

.. code-block:: html+twig

<p class="a-class another-class errored pending">
How are you doing?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super pedantic review from a complete stranger here...

The output isn't quite correct, since there will be no white space between around "How are you doing?"

I doubt anyone would get confused, but maybe change the doc to

[...] this will render (white space added for clarity):

</p>

.. note::

The ``html_classes`` function is part of the ``HtmlExtension`` which is not
Expand Down