Skip to content

Commit

Permalink
minor symfony#19891 [Console] Add other pre-defined block styles (dev…
Browse files Browse the repository at this point in the history
…ojifr)

This PR was squashed before being merged into the 5.4 branch.

Discussion
----------

[Console] Add other pre-defined block styles

Add other pre-defined block styles : error, info, comment, question
Fix missing word and typo

Commits
-------

b87da56 [Console] Add other pre-defined block styles
  • Loading branch information
javiereguiluz committed May 17, 2024
2 parents 5961ea1 + b87da56 commit ba80985
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 ba80985

Please sign in to comment.