[formatter] implement 'X' format specifier (#5770)
This commit is contained in:
@@ -180,6 +180,16 @@ Format specifiers can be used for advanced formatting by using the options provi
|
||||
<td><code>{foo:L3/long/}</code></td>
|
||||
<td><code>long</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2"><code>X<maxlen>/<ext>/</code></td>
|
||||
<td rowspan="2">Limit output to <code><maxlen></code> characters. Cut output and add <code><ext></code> to its end if its length exceeds <code><maxlen></code></td>
|
||||
<td><code>{foo:X15/ .../}</code></td>
|
||||
<td><code>Foo Bar</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>{foo:L6/ .../}</code></td>
|
||||
<td><code>Fo ...</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>J<separator>/</code></td>
|
||||
<td>Concatenates elements of a list with <code><separator></code> using <a href="https://docs.python.org/3/library/stdtypes.html#str.join" rel="nofollow"><code>str.join()</code></a></td>
|
||||
|
||||
Reference in New Issue
Block a user