Skip to content

Commit

Permalink
[Console] Add other pre-defined block styles
Browse files Browse the repository at this point in the history
  • Loading branch information
devojifr authored and javiereguiluz committed May 17, 2024
1 parent 5961ea1 commit b87da56
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit b87da56

Please sign in to comment.