[formatter] allow evaluating f-string literals

by starting a format string with '\fF'.

This was technically already possible with '\fE',
but this makes it a bit more convenient.
This commit is contained in:
Mike Fährmann
2022-03-18 13:31:01 +01:00
parent 58e0b17211
commit cf44aba333
3 changed files with 23 additions and 1 deletions

View File

@@ -197,6 +197,11 @@ Starting a format string with '\f<Type> ' allows to set a different format strin
<td>A template file containing the actual format string</td>
<td><code>\fT ~/.templates/booru.txt</code></td>
</tr>
<tr>
<td align="center"><code>F</code></td>
<td>An <a href="https://docs.python.org/3/tutorial/inputoutput.html#formatted-string-literals">f-string</a> literal</td>
<td><code>\fF '{title.strip()}' by {artist.capitalize()}</code></td>
</tr>
<tr>
<td align="center"><code>E</code></td>
<td>An arbitrary Python expression</td>