mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
Add a note about escaping braces in the editor templates
This commit is contained in:
parent
0e40a2550e
commit
37c2044c6f
1 changed files with 3 additions and 1 deletions
|
|
@ -538,7 +538,9 @@ def setup_ui(self):
|
|||
|
||||
self.helpl = la = QLabel(_(
|
||||
'The variables {0} and {1} will be replaced with the title and author of the book. {2}'
|
||||
' is where the cursor will be positioned.').format('{TITLE}', '{AUTHOR}', '%CURSOR%'))
|
||||
' is where the cursor will be positioned. If you want to include braces in your template,'
|
||||
' for example for CSS rules, you have to escape them, like this: {3}').format(*['<code>%s</code>'%x for x in
|
||||
['{TITLE}', '{AUTHOR}', '%CURSOR%', 'body {{ color: red }}']]))
|
||||
la.setWordWrap(True)
|
||||
l.addRow(la)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue