[formatter] add 'W' conversion - sanitize whitespace (#6582)
https://github.com/mikf/gallery-dl/issues/6582#issuecomment-3090777073
This commit is contained in:
@@ -128,6 +128,12 @@ Conversion specifiers allow to *convert* the value to a different form or type.
|
||||
<td><code>{foo!n}</code></td>
|
||||
<td><code>7</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><code>W</code></td>
|
||||
<td>Sanitize whitespace - Remove leading and trailing whitespace characters and replace <em>all</em> whitespace (sequences) with a single space <code> </code> character</td>
|
||||
<td><code>{space!W}</code></td>
|
||||
<td><code>Foo Bar</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><code>t</code></td>
|
||||
<td>Trim a string, i.e. remove leading and trailing whitespace characters</td>
|
||||
|
||||
Reference in New Issue
Block a user