Skip to content

[Console] Add other pre-defined block styles #19891

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

Merged
merged 1 commit into from
May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions components/console/helpers/formatterhelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ block will be formatted with more padding (one blank line above and below the
messages and 2 spaces on the left and right).

The exact "style" you use in the block is up to you. In this case, you're using
the pre-defined ``error`` style, but there are other styles, or you can create
your own. See :doc:`/console/coloring`.
the pre-defined ``error`` style, but there are other styles (``info``,
``comment``, ``question``), or you can create your own.
See :doc:`/console/coloring`.

Print Truncated Messages
------------------------
Expand All @@ -87,7 +88,7 @@ And the output will be:

This is...

The message is truncated to the given length, then the suffix is appended to end
The message is truncated to the given length, then the suffix is appended to the end
of that string.

Negative String Length
Expand All @@ -109,7 +110,7 @@ Custom Suffix

By default, the ``...`` suffix is used. If you wish to use a different suffix,
pass it as the third argument to the method.
The suffix is always appended, unless truncate length is longer than a message
The suffix is always appended, unless truncated length is longer than a message
and a suffix length.
If you don't want to use suffix at all, pass an empty string::

Expand Down
Loading