doc: pretty-formats: separate parameters from placeholders

Commit a57523428b (pretty: support padding placeholders, %< %> and %><,
2013-04-19) introduced columnated place holders. These placeholders
can be confusing as they contain `<` and `>` characters as part
of their placeholders adjacent to the `<N>` parameters.

Add spaces either side of the `<N>` parameters in the title line.
The code (strtol) will consume any spaces around the number values
(assuming they are passed as a quoted string with spaces).
Note that the spaces are optional.

Subsequent commits will clarify other confusions.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Philip Oakley 2023-01-19 18:18:23 +00:00 committed by Junio C Hamano
parent 262c45b6a1
commit d664a7ad20

View File

@ -152,8 +152,11 @@ The placeholders are:
truncate at the beginning (ltrunc), truncate at the beginning (ltrunc),
the middle (mtrunc) or the end the middle (mtrunc) or the end
(trunc) if the output is longer than (trunc) if the output is longer than
N columns. Note that truncating N columns.
Note 1: that truncating
only works correctly with N >= 2. only works correctly with N >= 2.
Note 2: spaces around the N
values are optional.
'%<|( <N> )':: make the next placeholder take at least until Nth '%<|( <N> )':: make the next placeholder take at least until Nth
columns, padding spaces on the right if necessary columns, padding spaces on the right if necessary
'%>( <N> )', '%>|( <N> )':: similar to '%<( <N> )', '%<|( <N> )' respectively, '%>( <N> )', '%>|( <N> )':: similar to '%<( <N> )', '%<|( <N> )' respectively,